Sultan Zhumatayev
Sultan Zhumatayev

Reputation: 555

Flyway init new db

I have existing database postgres which not using Flyway and i need replicate it. How to move existing database state to new empty database? I don't have any migration sql. So I am expecting command like generateChangelog in Liquibase but it seems in Flyway not existing command like that.

Upvotes: 0

Views: 158

Answers (1)

Grant Fritchey
Grant Fritchey

Reputation: 2775

Flyway currently only manages the scripts that you create. It doesn't create scripts for you. So, in order to take an existing database and get it into Flyway processing, you'll need to generate the scripts for that database. You can use the methods outlined here to get the scripts for your database. Then, just rename them to the Flyway standard. You'll be off and running.

Upvotes: 1

Related Questions