Search code examples
sqlmybatisdatabase-migration

MyBatis Migrations: does "migrate new" automatically generate the changes?


With the migrate new command, it generates a sql file:

-- // create blog table
-- Migration SQL that makes the change goes here.

-- //@UNDO
-- SQL to undo the change goes here.

Does the command detect my table and data changes and fill in with the script, such as Alter Table query, automatically? Or I have to fill in the scripts manually?


Solution

  • It was answered here:

    Migrations does not do any introspection or reverse engineering of your database. You have to enter the DDL changes your self.