com.tacitknowledge.util.migration.jdbc.postgres.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=true
patches.create=CREATE TABLE patches ( \
system_name VARCHAR(30) NOT NULL \
, patch_level INT4 NOT NULL \
, patch_date DATE NOT NULL DEFAULT (now()) \
, patch_in_progress CHAR(1) NOT NULL DEFAULT ('F') \
, PRIMARY KEY (system_name))
# Validates that a record exists for a given system
level.create=INSERT INTO patches (system_name, patch_level) VALUES ( ?, 0 )
level.read=SELECT patch_level FROM patches WHERE system_name = ?
level.update=UPDATE patches SET patch_level = ?, patch_date = now() 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 patches WHERE system_name = ?
lock.obtain=UPDATE patches SET patch_in_progress = 'T' WHERE system_name = ?
lock.release=UPDATE patches SET patch_in_progress = 'F' WHERE system_name = ?