1 2 3 4 5 6 7 8 |
--changeset javacoder:5 dbms:mysql --preconditions onFail:MARK_RAN onError:HALT --precondition-sql-check expectedResult:1 select count(1) from information_schema.COLUMNS where table_name='user' and column_name='email' and table_schema='${schema}' --comment: 删除user.email 字段 ALTER TABLE user DROP COLUMN `email`; |
使用 ${schema}
占位, 参数添加parameter.前缀
1 2 3 4 5 6 7 8 9 10 11 |
driver: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.140.128:3306/test username: root password: xxx liquibase.hub.mode: off # 用于比较 referenceUrl: jdbc:mysql://192.168.140.128:3306/test referenceUsername: root referencePassword: xxx parameter.schema: test |
./liquibase --search-path="/C/workspace/aiyunsi/yunsi-modules/aibrain-device/src/main/resources/db/changelog" update --defaultsFile=./dev.properties --changelog-file=device_changelog.sql
creating-config-properties.html
Posted in: java基础
Comments are closed.