2
我無法初始化,然後遷移MyQSL DB通過命令行2.0.2,這裏是我的配置文件:無法遷移MySQL數據庫
root# cat conf/global.properties
flyway.driver=com.mysql.jdbc.Driver
flyway.url=jdbc:mysql://localhost:3306/global
flyway.user=root
flyway.password=password
flyway.schemas=global
flyway.sqlMigrationPrefix=GLOBAL
flyway.locations=mysql/global
flyway.initialVersion=3.5.1.3.0
這裏是我的SQL腳本目錄的內容:
root# ls -1 mysql/global/
GLOBAL3.5.1.1.0_a__update_table.sql
GLOBAL3.5.1.2.0_a__add_column1.sql
GLOBAL3.5.1.3.0_a__add_column2.sql
GLOBAL3.6.0.0.0_a__add_table.sql
這裏是./flyway.sh -X信息的結果(幾乎沒有發現由這種方式調試模式):
root# ./flyway.sh -configFile=conf/global.properties info
Flyway (Command-line Tool) v.2.0.2
DEBUG: Adding location to classpath: PATH_TO_BIN/../jars/mysql-connector-java-5.1.18-bin.jar
DEBUG: Database: MySQL 5.1
DEBUG: DDL Transactions Supported: false
DEBUG: Schema: global
DEBUG: No metadata table upgrade to the Flyway 2.0 format necessary
DEBUG: No metadata table upgrade to the Flyway 2.0.2 format necessary
DEBUG: Spring Jdbc available: true
DEBUG: Scanning for resources at 'db/migration' (Prefix: 'GLOBAL', Suffix: '.sql')
DEBUG: Unable to determine URL for classpath location: db/migration (ClassLoader: [email protected])
DEBUG: Scanning for classes at 'db/migration' (Implementing: 'com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration')
DEBUG: Unable to determine URL for classpath location: db/migration (ClassLoader: [email protected])
DEBUG: Scanning for classes at 'db/migration' (Implementing: 'com.googlecode.flyway.core.api.migration.spring.SpringJdbcMigration')
DEBUG: Unable to determine URL for classpath location: db/migration (ClassLoader: [email protected])
DEBUG: Scanning for classes at 'db/migration' (Implementing: 'com.googlecode.flyway.core.migration.java.JavaMigration')
DEBUG: Unable to determine URL for classpath location: db/migration (ClassLoader: [email protected])
DEBUG: Scanning for resources at 'mysql/global' (Prefix: 'GLOBAL', Suffix: '.sql')
DEBUG: Unable to determine URL for classpath location: mysql/global (ClassLoader: [email protected])
DEBUG: Scanning for classes at 'mysql/global' (Implementing: 'com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration')
DEBUG: Unable to determine URL for classpath location: mysql/global (ClassLoader: [email protected])
DEBUG: Scanning for classes at 'mysql/global' (Implementing: 'com.googlecode.flyway.core.api.migration.spring.SpringJdbcMigration')
DEBUG: Unable to determine URL for classpath location: mysql/global (ClassLoader: [email protected])
DEBUG: Scanning for classes at 'mysql/global' (Implementing: 'com.googlecode.flyway.core.migration.java.JavaMigration')
DEBUG: Unable to determine URL for classpath location: mysql/global (ClassLoader: [email protected])
+-------------+------------------------+---------------------+---------+
| Version | Description | Installed on | State |
+-------------+------------------------+---------------------+---------+
| 3.5.1.3.0 | << Flyway Init >> | 2012-11-28 17:52:24 | Future |
+-------------+------------------------+---------------------+---------+
我不河畔e要了解「未來」狀態,我認爲flyway找不到任何SQL文件,但我不明白爲什麼... 任何想法?
好吧,它工作正常!謝謝! –