From: Kai Moritz Date: Sun, 25 Oct 2020 13:10:18 +0000 (+0100) Subject: Switched to Flayway for schema-creation X-Git-Tag: part-1~5 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=b4bfb022040b87ae2889d266b18a6305282b1f29;p=demos%2Fspring%2Fdata-jdbc Switched to Flayway for schema-creation --- diff --git a/pom.xml b/pom.xml index 77328f4..4cc7dc3 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,10 @@ org.projectlombok lombok + + org.flywaydb + flyway-core + com.h2database h2 diff --git a/src/main/resources/db/migration/V1__Table_users.sql b/src/main/resources/db/migration/V1__Table_users.sql new file mode 100644 index 0000000..5e3590b --- /dev/null +++ b/src/main/resources/db/migration/V1__Table_users.sql @@ -0,0 +1 @@ +CREATE TABLE users (id BIGINT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(255), created TIMESTAMP, logged_in BIT); diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql deleted file mode 100644 index 5e3590b..0000000 --- a/src/main/resources/schema.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE users (id BIGINT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(255), created TIMESTAMP, logged_in BIT);