All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tacitknowledge.util.migration.jdbc.postgres.properties Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
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 = ?




© 2015 - 2024 Weber Informatics LLC | Privacy Policy