com.tacitknowledge.util.migration.jdbc.oracle.properties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autopatch Show documentation
Show all versions of autopatch Show documentation
An automated Java patching system
supportsMultipleStatements=false
patches.create=CREATE TABLE tk_patches (\
system_name VARCHAR2(30) NOT NULL\
, patch_level NUMBER NOT NULL\
, patch_date DATE DEFAULT SYSDATE NOT NULL\
, patch_in_progress CHAR(1) DEFAULT 'F' NOT NULL\
, CONSTRAINT tk_patches_pk PRIMARY KEY (system_name) )
# Validates that a record exists for a given system
level.create=INSERT INTO tk_patches (system_name, patch_level) VALUES ( ?, 0 )
level.read=SELECT patch_level FROM tk_patches WHERE system_name = ?
level.update=UPDATE tk_patches SET patch_level = ?, patch_date = SYSDATE WHERE system_name = ?
# Since most DBs do not have a boolean type, return 0 or 1 row to determine if
# the system is currently locked.
lock.read=SELECT patch_in_progress FROM tk_patches WHERE system_name = ?
lock.obtain=UPDATE tk_patches SET patch_in_progress = 'T' WHERE system_name = ?
lock.release=UPDATE tk_patches SET patch_in_progress = 'F' WHERE system_name = ?