I have to following migration working in postgres:
(我必须在postgres中进行以下迁移:)
ALTER TABLE task_def
DROP COLUMN retry_count,
DROP COLUMN timeout_seconds;
(and running in prod) but now i want to switch to h2 for my unit test but h2 doesnt seem to accept it My database config in spring boot:
((并在prod中运行),但是现在我想切换到h2进行单元测试,但是h2似乎不接受它。)
spring.datasource.url=jdbc:h2:./target/testdb;MODE=PostgreSQL
spring.datasource.username="sa"
spring.datasource.password=""
spring.jpa.hibernate.ddl-auto=none
spring.datasource.driver-class-name=org.postgresql.Driver
spring.flyway.url=jdbc:h2:./target/testdb;MODE=PostgreSQL
spring.flyway.user="sa"
spring.flyway.password=""
spring.flyway.schemas=
The error:
(错误:)
Migration V3__.....sql failed
---------------------------------------
SQL State : 42S22
Error Code : 42122
Message : Column "DROP" not found; SQL statement:
ALTER TABLE task_def
DROP COLUMN retry_count,
DROP COLUMN timeout_seconds [42122-200]
Location : db/migration/V3__.....sql
Line : 1
Statement : ALTER TABLE task_def
DROP COLUMN retry_count,
DROP COLUMN timeout_seconds
ask by Robert Stevens translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…