From 0333ed4cf0b5db3f9ffcb0da31787f6e44139af5 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 11 Aug 2011 14:04:01 -0400 Subject: Added support for HSQL database. Revised dialects some more. Moved CREATE TABLE and CREATE INDEX statement generation to the dialect. Added DECIMAL(length, scale) support. Improved automatic dialect detection. Unspecified length string is now CLOB instead of TEXT. Boolean now maps to BOOLEAN instead of BIT. Expressions on unmapped fields will throw an IciqlException. Improved exception reporting. --- docs/02_table_versioning.mkd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/02_table_versioning.mkd') diff --git a/docs/02_table_versioning.mkd b/docs/02_table_versioning.mkd index 12cdf6c..29942fe 100644 --- a/docs/02_table_versioning.mkd +++ b/docs/02_table_versioning.mkd @@ -8,22 +8,22 @@ AND/OR
Your `com.iciql.DbUpgrader` implementation must specify the `IQVersion(version)` annotation ### How does it work? -If you choose to use versioning, iciql will maintain a table within your database named *_iq_versions* which is defined as: +If you choose to use versioning, iciql will maintain a table within your database named *iq_versions* which is defined as: - CREATE TABLE _IQ_VERSIONS(SCHEMANAME VARCHAR(255) NOT NULL, TABLENAME VARCHAR(255) NOT NULL, VERSION INT NOT NULL) + CREATE TABLE IQ_VERSIONS(SCHEMANAME VARCHAR(255) NOT NULL, TABLENAME VARCHAR(255) NOT NULL, VERSION INT NOT NULL) This database table is automatically created if and only if at least one of your model classes specifies a *version* > 0. -When you generate a statement, iciql will compare the annotated version field of your model class to its last known value in the *_iq_versions* table. If *_iq_versions* lags behind the model annotation, iciql will immediately call the registered `com.iciql.DbUpgrader` implementation before generating and executing the current statement. +When you generate a statement, iciql will compare the annotated version field of your model class to its last known value in the *iq_versions* table. If *iq_versions* lags behind the model annotation, iciql will immediately call the registered `com.iciql.DbUpgrader` implementation before generating and executing the current statement. When an upgrade scenario is identified, the current version and the annotated version information is passed to either: - `DbUpgrader.upgradeDatabase(db, fromVersion, toVersion)` - `DbUpgrader.upgradeTable(db, schema, table, fromVersion, toVersion)` -both of which allow for non-linear upgrades. If the upgrade method call is successful and returns *true*, iciql will update the *_iq_versions* table with the annotated version number. +both of which allow for non-linear upgrades. If the upgrade method call is successful and returns *true*, iciql will update the *iq_versions* table with the annotated version number. The actual upgrade procedure is beyond the scope of iciql and is your responsibility to implement. This is simply a mechanism to automatically identify when an upgrade is necessary. **NOTE:**
-The database entry of the *_iq_versions* table is specified as SCHEMANAME='' and TABLENAME=''. \ No newline at end of file +The database entry of the *iq_versions* table is specified as SCHEMANAME='' and TABLENAME=''. \ No newline at end of file -- cgit v1.2.3