Is there a portable way or best practice to access a version number for a schema at runtime?
Rationale: you have multiple systems (development, QA, etc.) where you push schema changes from one system to the next. Say you're not sure if you already have the latest schema on the QA system, how can you find out the version of the current schema (preferably automated with a script)?
I could imagine having
- a convention on using a table comment (
COMMENT ON TABLEwith Oracle, is that a standard?) to version every table - a special table in the schema storing version information
How do you do this? Is there a best practice?
liquibase diffand expect it to be empty? Or useliquibase statusand expect no unrun change sets? – pesche Oct 31 '14 at 15:46