每当我运行Opened database successfully
Table created successfully
(0, ['Ask', 'Bid', 'Change', 'ContractSymbol', 'ImpliedVolatility', 'LastPrice', 'LastTradeDate', 'OpenInterest', 'PercentChange', 'Strike', 'Volume'])
(1, ['27.9', '27.4', '-2.74', 'AAPL180803C00162500', '84.28%', '27.35', '7/30/2018', '2', '-9.11%', '162.5', '2'])
(2, ['23', '22.55', '-1.01', 'AAPL180803C00167500', '76.86%', '22.79', '7/30/2018', '101', '-4.24%', '167.5', '16'])
(3, ['0.01', '0', '0', 'AAPL180803C00225000', '54.69%', '0.01', '7/30/2018', '125', '0.00%', '225', '23'])
(4, ['0.02', '0', '0', 'AAPL180803C00227500', '60.94%', '0.02', '7/27/2018', '0', '0.00%', '227.5', '2'])
(5, ['0.02', '0', '0', 'AAPL180803C00230000', '64.84%', '0.01', '7/27/2018', '0', '0.00%', '230', '81'])
时,Flyway都会自动在mvn spring-boot:run
中进行挂起的迁移并运行它们。现在没有。即使当我使用/src/main/resources/db/migration/
或mvn compile
时,它也会抱怨缺少表-因为挂起的迁移会创建它!我尝试mvn package
并抱怨
[错误]在存储库[本地(C:\ Users \)中找不到当前项目和插件组[org.apache.maven.plugins,org.codehaus.mojo]中前缀“ flyway”的插件。 Chloe.m2 \ repository),中央(https://repo.maven.apache.org/maven2)]-> [帮助1]
这是POM
mvn flyway:migrate
https://flywaydb.org/documentation/plugins/springboot
我在运行<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
时在控制台输出中发现了这一点:
spring-boot:run
Java 8,Mvn 3,Spring Boot 1.5.13