Switched to Flayway for schema-creation
authorKai Moritz <kai@juplo.de>
Sun, 25 Oct 2020 13:10:18 +0000 (14:10 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 6 Feb 2021 15:41:21 +0000 (16:41 +0100)
pom.xml
src/main/resources/db/migration/V1__Table_users.sql [new file with mode: 0644]
src/main/resources/schema.sql [deleted file]

diff --git a/pom.xml b/pom.xml
index 77328f4..4cc7dc3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
      </dependency>
+     <dependency>
+       <groupId>org.flywaydb</groupId>
+       <artifactId>flyway-core</artifactId>
+     </dependency>
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
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 (file)
index 0000000..5e3590b
--- /dev/null
@@ -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 (file)
index 5e3590b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CREATE TABLE users (id BIGINT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(255), created TIMESTAMP, logged_in BIT);