aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/db')
-rw-r--r--src/main/resources/db/migration/V1.30__token_type.sql4
-rw-r--r--src/main/resources/db/migration/V1.31__user_services.sql1
-rw-r--r--src/main/resources/db/migration/V1.32__drop_token_tables.sql2
-rw-r--r--src/main/resources/db/specific/h2/V1.22__schema.sql2
4 files changed, 8 insertions, 1 deletions
diff --git a/src/main/resources/db/migration/V1.30__token_type.sql b/src/main/resources/db/migration/V1.30__token_type.sql
new file mode 100644
index 00000000..601695d8
--- /dev/null
+++ b/src/main/resources/db/migration/V1.30__token_type.sql
@@ -0,0 +1,4 @@
+alter table android add column service_type varchar(255) not null default 'fcm';
+insert into android (user_id, ts, regid, service_type) select user_id, ts, url regid, 'mpns' from winphone;
+insert into android (user_id, ts, regid, service_type) select user_id, ts, token regid, 'apns' from ios;
+
diff --git a/src/main/resources/db/migration/V1.31__user_services.sql b/src/main/resources/db/migration/V1.31__user_services.sql
new file mode 100644
index 00000000..cca1f9dd
--- /dev/null
+++ b/src/main/resources/db/migration/V1.31__user_services.sql
@@ -0,0 +1 @@
+alter table android rename to user_services
diff --git a/src/main/resources/db/migration/V1.32__drop_token_tables.sql b/src/main/resources/db/migration/V1.32__drop_token_tables.sql
new file mode 100644
index 00000000..a1599670
--- /dev/null
+++ b/src/main/resources/db/migration/V1.32__drop_token_tables.sql
@@ -0,0 +1,2 @@
+DROP TABLE ios;
+DROP TABLE winphone
diff --git a/src/main/resources/db/specific/h2/V1.22__schema.sql b/src/main/resources/db/specific/h2/V1.22__schema.sql
index de6946e8..46d39ac6 100644
--- a/src/main/resources/db/specific/h2/V1.22__schema.sql
+++ b/src/main/resources/db/specific/h2/V1.22__schema.sql
@@ -3,7 +3,7 @@ SET DB_CLOSE_DELAY -1;
CREATE MEMORY TABLE "PUBLIC"."ANDROID"(
"USER_ID" INTEGER NOT NULL,
- "REGID" CHARACTER(255) NOT NULL,
+ "REGID" VARCHAR(255) NOT NULL,
"TS" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANDROID;