[add] migration:postgres-r6-r7
This commit is contained in:
parent
6a494aab8c
commit
2eba7fac2a
34
source/migrations/r6-r7.postgresql.sql
Normal file
34
source/migrations/r6-r7.postgresql.sql
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
-- user_settings
|
||||
CREATE TABLE
|
||||
user_settings(
|
||||
"id" SERIAL,
|
||||
"user_id" INTEGER NOT NULL,
|
||||
"use_fallback_for_date_and_time_inputs" BOOLEAN NOT NULL,
|
||||
"weekview_vertical_default" BOOLEAN NOT NULL,
|
||||
FOREIGN KEY ("user_id") REFERENCES "users"("id"),
|
||||
UNIQUE ("user_id"),
|
||||
UNIQUE ("id")
|
||||
)
|
||||
;
|
||||
|
||||
INSERT INTO
|
||||
user_settings(
|
||||
user_id,
|
||||
use_fallback_for_date_and_time_inputs,
|
||||
weekview_vertical_default
|
||||
)
|
||||
SELECT
|
||||
id AS user_id,
|
||||
FALSE,
|
||||
FALSE
|
||||
FROM
|
||||
users
|
||||
;
|
||||
|
||||
-- revision
|
||||
UPDATE
|
||||
_meta
|
||||
SET
|
||||
revision = 'r7'
|
||||
;
|
||||
|
||||
Loading…
Reference in a new issue