Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : cvc-complex-type.2.3: Element 'createTable' cannot have character [children]

$
0
0
That worked Mark, changing the version from "1.1" To "1.0" helped to parse the XML without any errors.

I don't know why it's trying to convert default value of "CURRENT_TIMESTAMP"  for a TIMESTAMP column to a NOW() and failing...

the original definition for this table has TLM column defined as following:

`TLM` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

liquibase is trying to transform it as follows and fails:

 `TLM` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP

--- error--

SEVERE 1/30/17 12:36 PM: liquibase: /home/local/CAREZEN/rreddy/liquibase/db.changelog.xml::1484939656104-1::root (generated): Invalid default value for 'TLM' [Failed SQL: CREATE TABLE test.ACCOUNT_PHONE_NUMBER (ID INT UNSIGNED AUTO_INCREMENT NOT NULL, PHONE_NUMBER VARCHAR(12) NOT NULL COMMENT 'The phone number allocated to the account', COMMUNICATION_ACCOUNT_ID INT UNSIGNED NOT NULL COMMENT 'The communication account to which this phone number belongs to', SMS_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT 'This flag tells whether twilio number supports sms or not', MMS_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT 'This flag tells whether twilio number supports mms or not', VOICE_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT 'This flag tells whether twilio number supports voice or not', STATUS ENUM('ACTIVE', 'INACTIVE') DEFAULT 'ACTIVE' NOT NULL COMMENT 'The status of the communication request', STATUS_TLM datetime(6) NOT NULL COMMENT 'The time the status got updated', WHEN_CREATED datetime(6) NOT NULL COMMENT 'The time this account is created', TLM TIMESTAMP(19) DEFAULT NOW() NOT NULL, CONSTRAINT PK_ACCOUNT_PHONE_NUMBER PRIMARY KEY (ID))]
liquibase.exception.MigrationFailedException: Migration failed for change set /home/local/CAREZEN/rreddy/liquibase/db.changelog.xml::1484939656104-1::root (generated):
     Reason: liquibase.exception.DatabaseException: Invalid default value for 'TLM' [Failed SQL: CREATE TABLE test.ACCOUNT_PHONE_NUMBER (ID INT UNSIGNED AUTO_INCREMENT NOT NULL, PHONE_NUMBER VARCHAR(12) NOT NULL COMMENT 'The phone number allocated to the account', COMMUNICATION_ACCOUNT_ID INT UNSIGNED NOT NULL COMMENT 'The communication account to which this phone number belongs to', SMS_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT 'This flag tells whether twilio number supports sms or not', MMS_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT 'This flag tells whether twilio number supports mms or not', VOICE_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT 'This flag tells whether twilio number supports voice or not', STATUS ENUM('ACTIVE', 'INACTIVE') DEFAULT 'ACTIVE' NOT NULL COMMENT 'The status of the communication request', STATUS_TLM datetime(6) NOT NULL COMMENT 'The time the status got updated', WHEN_CREATED datetime(6) NOT NULL COMMENT 'The time this account is created', TLM TIMESTAMP(19) DEFAULT NOW() NOT NULL, CONSTRAINT PK_ACCOUNT_PHONE_NUMBER PRIMARY KEY (ID))]
        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
        at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
        at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
        at liquibase.Liquibase.update(Liquibase.java:214)
        at liquibase.Liquibase.update(Liquibase.java:192)
        at liquibase.integration.commandline.Main.doMigration(Main.java:1130)
        at liquibase.integration.commandline.Main.run(Main.java:188)
        at liquibase.integration.commandline.Main.main(Main.java:103)


Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>