Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flyway migrate says schema is up to date

Tags:

flyway

I have installed Flyway in my server and trying to execute a My-sql file which I placed in sql folder of flyway.

I have done Flyway baseline, and when I run flyway migrate it says "Schema xyz is up to date. No migration necessary." No matter what I do it always gives me the same result.

My sql files are named 1__act.sql, 2__act.sql, 3__act.sql.

My config file has

flyway.url=jdbc:mysql://mysql:port/xyz
flyway.user=flywayuser
flyway.password=flywaypassword
flyway.baselineVersion=1
like image 353
abhishek veerelli Avatar asked May 10 '17 09:05

abhishek veerelli


People also ask

What is schema in Flyway?

Flyway uses a schema history table to track the version of each database, recording in it every versioned migration file applied to build that version.

Does Flyway migrate data?

Flyway is an open-source database migration tool. It strongly favors simplicity and convention over configuration. It is based around just 7 basic commands: Migrate, Clean, Info, Validate, Undo, Baseline and Repair.


1 Answers

You haven't followed the naming conventions for Versioned SQL migrations, they should be prefixed with a V. e.g. V1__act.sql.

Note that the prefix is configurable, but above is the default.

like image 132
markdsievers Avatar answered Sep 30 '22 17:09

markdsievers