当前位置:网站首页>[flyway introduction]
[flyway introduction]
2022-07-24 00:50:00 【gaojingsong】
1、Flyway Introduce
Official website address :https://flywaydb.org/documentation/
Flyway is an open-source database migration tool. It strongly favors simplicity and convention over configuration.
Flyway Is a Open source database version management tool . It strongly supports simplicity and conventions , Not configuration .
It is based around just 7 basic commands: Migrate, Clean, Info, Validate, Undo, Baseline and Repair.
around 7 It's a basic order :Migrate, Clean, Info, Validate, Undo, Baseline and Repair.
Migrations can be written in SQL (database-specific syntax (such as PL/SQL, T-SQL, ...) is supported) or Java (for advanced data transformations or dealing with LOBs).
It has a Command-line client. If you are on the JVM, we recommend using the Java API for migrating the database on application startup. Alternatively, you can also use the Maven plugin or Gradle plugin.
It has a command-line client . If you are in JVM On , We recommend using Java API Migrate database . perhaps , You can also use the Maven Plug-in or Gradle plug-in unit .
And if that's not enough, there are plugins available for Spring Boot, Dropwizard, Grails, Play, SBT, Ant, Griffon, Grunt, Ninja and more!
Supported databases are Oracle, SQL Server (including Amazon RDS and Azure SQL Database), Azure Synapse (Formerly Data Warehouse), DB2, MySQL (including Amazon RDS, Azure Database & Google Cloud SQL), Aurora MySQL, MariaDB, Percona XtraDB Cluster, TestContainers, PostgreSQL (including Amazon RDS, Azure Database, Google Cloud SQL, TimescaleDB, YugabyteDB & Heroku), Aurora PostgreSQL, Redshift, CockroachDB, SAP HANA, Sybase ASE, Informix, H2, HSQLDB, Derby, Snowflake, SQLite and Firebird.
Supported databases include Oracle、SQL Server( Include Amazon RDS and Azure SQL database )、Azure Synapse( The former data warehouse )、DB2、MySQL( Include Amazon RDS、Azure Database and Google Cloud SQL)、Aurora MySQL、MariaDB、Percona XtraDB Cluster、TestContainers、PostgreSQL( Include Amazon RDS、Azure Database、Google Cloud SQL、TimescaleDB、YugabyteDB and Heroku)、Aurora PostgreSQL、Redshift、,CockroachDB、SAP HANA、Sybase ASE、Informix、H2、HSQLDB、Derby、Snowflake、SQLite and Firebird.
Flyway It can manage and track database changes independently of applications , Support automatic upgrade of database version , And there is a default protocol , No complex configuration required ,Migrations It can be written. SQL Script .
Flyway Version management of database is mainly composed of Metadata Table and 6 Command completion ,
2. Flyway The characteristics of
Flyway Its popularity is due to the following advantages :
Simple It's easy to install and learn , At the same time, the way of migration is easily accepted by developers .
focus Specifically for database migration 、 Version control without any other reaction .
Powerful Designed for continuous delivery , Give Way Flyway Migrate the database when the application starts .
3. Flyway How it works
Flyway It needs to be in DB First of all, create a metadata surface ( The default table name is flyway_schema_history), Every time... Is saved in this table migration ( transfer ) The record of , The record contains migration The version number of the script and SQL The script checksum value .
flyway Command line
flyway Provide command line tools , Common commands include :
Clean: Delete all created database objects , Include users 、 surface 、 View etc. . Be careful not to execute... On the production library clean operation .
Migrate: Apply version changes to the database in turn .
Info: Get the status of the current database . Those migrations have been completed , Those migrations are to be completed . Execution time and results of all migrations .
Validate: Verify that Apply Is there any change in the script of , Flyway Of Migration Do it first by default Validate.
Baseline: Generate a benchmark migration script based on the existing database structure .
Repair: Repair command try not to use , The restoration scene has : 1. Remove the failed migration Record . 2. What has been applied SQL The script was modified , We want to re apply the SQL Script .
边栏推荐
- Table custom table encapsulation
- IDEA 热部署(热加载)
- Are the top ten securities companies risky and safe to open accounts?
- Classic example of C language - commodity inspection code
- 《天幕红尘》笔记与思考(六)因缺而需
- Pbootcms database conversion tutorial (SQLite to MySQL detailed tutorial)
- Redis cluster hash sharding algorithm (slot location algorithm)
- Distributed cap principle
- Intelligent OCR identification of express documents helps the logistics industry to upgrade Digitalization
- Multi data source configuration of mongodb
猜你喜欢

How to use SAP intelligent robotic process automation to automate Excel

Database connection pool & dbutils

T-seda code

Detailed overview of data standards -2022

Introduction to several scenarios involving programming operation of Excel in SAP implementation project

How can dbcontext support the migration of different databases in efcore advanced SaaS system

Expérience du système réseau: résoudre les problèmes de ping

多源文件方式去访问全局变量的方式(extern用法)

Pbootcms database conversion tutorial (SQLite to MySQL detailed tutorial)

北峰通信亮相中国(厦门)应急展|智能化通信手段强势吸睛!
随机推荐
Comparison of image preprocessing between pytorch opencv pil
Beifeng communication appeared in China (Xiamen) emergency exhibition | intelligent communication means are strong and eye-catching!
《天幕红尘》笔记与思考(六)因缺而需
Memory forensics nssctf otterctf 2018 (replay)
Pbootcms database conversion tutorial (SQLite to MySQL detailed tutorial)
如何使用 SAP Intelligent Robotic Process Automation 自动操作 Excel
Semaphore
IDEA 热部署(热加载)
Tutorial on principles and applications of database system (045) -- MySQL query (VII): aggregate function
This is a big problem
Notes and Reflections on the red dust of the sky (V) strong culture and weak culture
Classic example of C language - commodity inspection code
Database connection pool & dbutils
数仓数据指标和标签体系区别
Bean Validation使用篇----05
win10下基于anaconda的detectron2安装
网络系统实验:ping不通的问题解决
postman测试接口在URL配置正确的情况下出现404或者500错误
mysql 分支语句case报错
How to use SAP intelligent robotic process automation to automate Excel