August 2017
Intermediate to advanced
332 pages
9h 16m
English
The next step is to define the SQL file that adds the calculation table into the database schema. Let's create the src/main/resources/db/migration/V1__Create_calculation_table.sql file with the following content:
create table CALCULATION ( ID int not null auto_increment, A varchar(100), B varchar(100), RESULT varchar(100), primary key (ID));
Note the migration file naming convention, <version>__<change_description>.sql. The SQL file creates a table with four columns, ID, A, B, RESULT. The ID column is an automatically incremented primary key of the table. Now, we are ready to run the Flyway command to apply the migration:
$ ./gradlew flywayMigrate -i…Successfully applied 1 migration to schema "PUBLIC" (execution ...
Read now
Unlock full access