org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Migration V1__hoge.sql failed ------------------------------ SQL State : 42000 Error Code : 42000 Message : SQLステートメントに文法エラーがあります "CREATE TABLE ""HOGES"" ( ""HOGE_ID"" BIGINT NOT NULL AUTO_INCREMENT, ""NAME"" VARCHAR(255) NOT NULL, ""EMAIL"" VARCHAR(255) NOT NULL, ""URL"" VARCHAR(255) DEFAULT NULL, ""COMMENT"" TEXT DEFAULT NULL, ""CREATED_AT"" DATETIME DEFAULT NULL, ""UPDATED_AT"" DATETIME DEFAULT NULL, PRIMARY KEY (""HOGE_ID""), UNIQUE KEY ""INDEX_HOGES_ON_EMAIL"" (""EMAIL"") ) ENGINE=INNODB DEFAULT CHARSET=UTF8 COLLATE[*]=UTF8_GENERAL_CI " Syntax error in SQL statement "CREATE TABLE ""HOGES"" ( ""HOGE_ID"" BIGINT NOT NULL AUTO_INCREMENT, ""NAME"" VARCHAR(255) NOT NULL, ""EMAIL"" VARCHAR(255) NOT NULL, ""URL"" VARCHAR(255) DEFAULT NULL, ""COMMENT"" TEXT DEFAULT NULL, ""CREATED_AT"" DATETIME DEFAULT NULL, ""UPDATED_AT"" DATETIME DEFAULT NULL, PRIMARY KEY (""HOGE_ID""), UNIQUE KEY ""INDEX_HOGES_ON_EMAIL"" (""EMAIL"") ) ENGINE=INNODB DEFAULT CHARSET=UTF8 COLLATE[*]=UTF8_GENERAL_CI "; SQL statement: CREATE TABLE `hoges` ( `hoge_id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `url` varchar(255) DEFAULT NULL, `comment` text DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`hoge_id`), UNIQUE KEY `index_hoges_on_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci [42000-190] Location : db/migration/V1__hoge.sql (/Users/niwashun/Workspaces/hogemoge/target/dev/scala-2.11/classes/db/migration/V1__hoge.sql) Line : 1 Statement : CREATE TABLE `hoges` ( `hoge_id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `url` varchar(255) DEFAULT NULL, `comment` text DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`hoge_id`), UNIQUE KEY `index_hoges_on_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci

qiita.com | 2 months ago
  1. 0

    Flyway + H2 with MySQL Compatibility Mode - Qiita

    qiita.com | 2 months ago
    org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Migration V1__hoge.sql failed ------------------------------ SQL State : 42000 Error Code : 42000 Message : SQLステートメントに文法エラーがあります "CREATE TABLE ""HOGES"" ( ""HOGE_ID"" BIGINT NOT NULL AUTO_INCREMENT, ""NAME"" VARCHAR(255) NOT NULL, ""EMAIL"" VARCHAR(255) NOT NULL, ""URL"" VARCHAR(255) DEFAULT NULL, ""COMMENT"" TEXT DEFAULT NULL, ""CREATED_AT"" DATETIME DEFAULT NULL, ""UPDATED_AT"" DATETIME DEFAULT NULL, PRIMARY KEY (""HOGE_ID""), UNIQUE KEY ""INDEX_HOGES_ON_EMAIL"" (""EMAIL"") ) ENGINE=INNODB DEFAULT CHARSET=UTF8 COLLATE[*]=UTF8_GENERAL_CI " Syntax error in SQL statement "CREATE TABLE ""HOGES"" ( ""HOGE_ID"" BIGINT NOT NULL AUTO_INCREMENT, ""NAME"" VARCHAR(255) NOT NULL, ""EMAIL"" VARCHAR(255) NOT NULL, ""URL"" VARCHAR(255) DEFAULT NULL, ""COMMENT"" TEXT DEFAULT NULL, ""CREATED_AT"" DATETIME DEFAULT NULL, ""UPDATED_AT"" DATETIME DEFAULT NULL, PRIMARY KEY (""HOGE_ID""), UNIQUE KEY ""INDEX_HOGES_ON_EMAIL"" (""EMAIL"") ) ENGINE=INNODB DEFAULT CHARSET=UTF8 COLLATE[*]=UTF8_GENERAL_CI "; SQL statement: CREATE TABLE `hoges` ( `hoge_id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `url` varchar(255) DEFAULT NULL, `comment` text DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`hoge_id`), UNIQUE KEY `index_hoges_on_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci [42000-190] Location : db/migration/V1__hoge.sql (/Users/niwashun/Workspaces/hogemoge/target/dev/scala-2.11/classes/db/migration/V1__hoge.sql) Line : 1 Statement : CREATE TABLE `hoges` ( `hoge_id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `url` varchar(255) DEFAULT NULL, `comment` text DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`hoge_id`), UNIQUE KEY `index_hoges_on_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci
  2. 0

    Flyway + H2 with MySQL Compatibility Mode - Qiita

    qiita.com | 2 months ago
    org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Script failed ------------- SQL State : 90079 Error Code : 90079 Message : スキーマ "public" が見つかりません Schema "public" not found; SQL statement: CREATE TABLE "public"."schema_version" ( "version_rank" INT NOT NULL, "installed_rank" INT NOT NULL, "version" VARCHAR(50) NOT NULL, "description" VARCHAR(200) NOT NULL, "type" VARCHAR(20) NOT NULL, "script" VARCHAR(1000) NOT NULL, "checksum" INT, "installed_by" VARCHAR(100) NOT NULL, "installed_on" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, "execution_time" INT NOT NULL, "success" BOOLEAN NOT NULL ) [90079-190] Line : 17 Statement : CREATE TABLE "public"."schema_version" ( "version_rank" INT NOT NULL, "installed_rank" INT NOT NULL, "version" VARCHAR(50) NOT NULL, "description" VARCHAR(200) NOT NULL, "type" VARCHAR(20) NOT NULL, "script" VARCHAR(1000) NOT NULL, "checksum" INT, "installed_by" VARCHAR(100) NOT NULL, "installed_on" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, "execution_time" INT NOT NULL, "success" BOOLEAN NOT NULL )
  3. 0

    DSpace-CRIS Database Update Failure

    Google Groups | 3 months ago | Sean Carte
    java.sql.SQLException: Flyway migration error occurred
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Flyway baselines new schemas, since they always have a schema_version table.

    GitHub | 2 years ago | benheilers
    org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Migration V2__AddColumn.sql failed ---------------------------------- SQL State : 42P01 Error Code : 0 Message : ERROR: relation "test_table" does not exist Location : db/migration/V2__AddColumn.sql (/home/heilers/perforce/ben-linux/main/twopi/overlord/event-channel/realtime-processing/db/migration/V2__AddColumn.sql) Line : 1 Statement : ALTER TABLE test_table ADD date_created timestamp
  6. 0

    GitHub comment 360#162520319

    GitHub | 1 year ago | hohwille
    org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Migration V9001_1__Delete_data.sql failed ----------------------------------------- SQL State : 42S02 Error Code : 42102 Message : Table "RESTAURANTTABLE" not found; SQL statement: DELETE FROM RESTAURANTTABLE [42102-190] Location : AllTests/setup/db/V9001_1__Delete_data.sql (C:\Projekte\oasp\workspaces\main\oasp4j\oasp4j-samples\oasp4j-sample-core\eclipse-target\test-classes\AllTests\setup\db\V9001_1__Delete_data.sql) Line : 3 Statement : DELETE FROM RESTAURANTTABLE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException

      Migration V1__hoge.sql failed ------------------------------ SQL State : 42000 Error Code : 42000 Message : SQLステートメントに文法エラーがあります "CREATE TABLE ""HOGES"" ( ""HOGE_ID"" BIGINT NOT NULL AUTO_INCREMENT, ""NAME"" VARCHAR(255) NOT NULL, ""EMAIL"" VARCHAR(255) NOT NULL, ""URL"" VARCHAR(255) DEFAULT NULL, ""COMMENT"" TEXT DEFAULT NULL, ""CREATED_AT"" DATETIME DEFAULT NULL, ""UPDATED_AT"" DATETIME DEFAULT NULL, PRIMARY KEY (""HOGE_ID""), UNIQUE KEY ""INDEX_HOGES_ON_EMAIL"" (""EMAIL"") ) ENGINE=INNODB DEFAULT CHARSET=UTF8 COLLATE[*]=UTF8_GENERAL_CI " Syntax error in SQL statement "CREATE TABLE ""HOGES"" ( ""HOGE_ID"" BIGINT NOT NULL AUTO_INCREMENT, ""NAME"" VARCHAR(255) NOT NULL, ""EMAIL"" VARCHAR(255) NOT NULL, ""URL"" VARCHAR(255) DEFAULT NULL, ""COMMENT"" TEXT DEFAULT NULL, ""CREATED_AT"" DATETIME DEFAULT NULL, ""UPDATED_AT"" DATETIME DEFAULT NULL, PRIMARY KEY (""HOGE_ID""), UNIQUE KEY ""INDEX_HOGES_ON_EMAIL"" (""EMAIL"") ) ENGINE=INNODB DEFAULT CHARSET=UTF8 COLLATE[*]=UTF8_GENERAL_CI "; SQL statement: CREATE TABLE `hoges` ( `hoge_id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `url` varchar(255) DEFAULT NULL, `comment` text DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`hoge_id`), UNIQUE KEY `index_hoges_on_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci [42000-190] Location : db/migration/V1__hoge.sql (/Users/niwashun/Workspaces/hogemoge/target/dev/scala-2.11/classes/db/migration/V1__hoge.sql) Line : 1 Statement : CREATE TABLE `hoges` ( `hoge_id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `url` varchar(255) DEFAULT NULL, `comment` text DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`hoge_id`), UNIQUE KEY `index_hoges_on_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci

      at org.flywaydb.core.internal.dbsupport.SqlScript.execute()
    2. ${project.artifactId}
      TransactionTemplate.execute
      1. org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:117)
      2. org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:71)
      3. org.flywaydb.core.internal.command.DbMigrate$5.doInTransaction(DbMigrate.java:284)
      4. org.flywaydb.core.internal.command.DbMigrate$5.doInTransaction(DbMigrate.java:282)
      5. org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
      6. org.flywaydb.core.internal.command.DbMigrate.applyMigration(DbMigrate.java:282)
      7. org.flywaydb.core.internal.command.DbMigrate.access$800(DbMigrate.java:46)
      8. org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:207)
      9. org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:156)
      10. org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
      10 frames