Spring Boot 專案中引入 flyway

2021-10-05 09:05:54 字數 2398 閱讀 7444

org.flywaydb

flyway-core

5.2.4

# flyway

spring.flyway.baseline-on-migrate=true

spring.flyway.baseline-description=<< flyway baseline >>

# 禁止刪除 schema 下的 table

spring.flyway.clean-disabled=true

spring:

flyway:

baseline-on-migrate: true

baseline-description: << flyway baseline >>

clean-disabled: true

執行成功 success 為 1 反之為 0

insert into `flyway_schema_history` (`installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`)

values ('取值為當前表中最後乙個id + 1', '1.0.1(需要跳過的檔案的字首)', '<< flyway baseline >>', 'baseline', '<< flyway baseline >>', null, 'root', '2020-04-22 09:30:30', '0', '1');

values (''取值為當前表中最後乙個id + 1', '1.0.1(需要跳過的檔案的字首,__之前的部分)', ' 將 『_』 替換為 』 『(空格)之後的檔名,__之後的部分', 'sql', '版本/全檔名', '1272695492(隨意)', 'root', '2020-04-22 09:30:47(隨意)', '17305(執行時間)', '1(固定為1)');

insert into `flyway_schema_history` (`installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`)

values ('2', '1.0.1', 'ddl create tables ', 'sql', '1.0/v1.0.1__ddl_create_tables.sql', '1272695492', 'root', '2020-04-22 09:30:47', '17305', '1');

drop table if exists `flyway_schema_history`;

create table `flyway_schema_history` (

`installed_rank` int(11) not null,

`version` varchar(50) default null,

`description` varchar(200) not null,

`type` varchar(20) not null,

`script` varchar(1000) not null,

`checksum` int(11) default null,

`installed_by` varchar(100) not null,

`installed_on` timestamp not null default current_timestamp,

`execution_time` int(11) not null,

`success` tinyint(1) not null,

primary key (`installed_rank`),

key `flyway_schema_history_s_idx` (`success`)

) ;

insert into `flyway_schema_history` (`installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`)

values ('1', '1', '<< flyway baseline >>', 'baseline', '<< flyway baseline >>', null, 'root', '2020-04-22 09:30:30', '0', '1');

專案中引入字型

font face html,body蘋方提供了六個字重,font family 定義如下 蘋方 簡 常規體 font family pingfangsc regular,sans serif 蘋方 簡 極細體 font family pingfangsc ultralight,sans serif...

專案中引入kafka

專案如果需要引入kafka,可以從以下幾個流程走 1.pom檔案引對應的jar包 org.apache.kafka kafka 2.9.2 0.8.2.1 有的專案還需要將對應使用kafka的包 類作為groupid artifactid引入 例 如果專案已經做了相應配置,則只需要引入最上面的jar...

Springboot專案中Swagger的使用

2.7.0swagger.version properties io.springfoxgroupid springfox swagger uiartifactid version dependency io.springfoxgroupid springfox swagger2artifactid...