[mod] structure:r4 [add] migration:r3-r4:postgresql
This commit is contained in:
parent
85605fd33a
commit
74218e885e
49
source/migrations/r3-r4.postgresql.sql
Normal file
49
source/migrations/r3-r4.postgresql.sql
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
-- users
|
||||
|
||||
ALTER TABLE
|
||||
"users"
|
||||
ADD COLUMN
|
||||
"dav_token" VARCHAR(255)
|
||||
;
|
||||
|
||||
|
||||
-- caldav_resources
|
||||
|
||||
ALTER TABLE
|
||||
"caldav_resources"
|
||||
RENAME TO
|
||||
"ics_feed_resources"
|
||||
;
|
||||
|
||||
ALTER TABLE
|
||||
"ics_feed_resources"
|
||||
DROP COLUMN
|
||||
"read_only"
|
||||
;
|
||||
|
||||
ALTER TABLE
|
||||
"ics_feed_resources"
|
||||
ADD COLUMN
|
||||
"from_fucked_up_wordpress" BOOLEAN NOT NULL
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN
|
||||
"resources"."kind"
|
||||
IS
|
||||
'»local« | »ics_feed«'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN
|
||||
"resources"."sub_id"
|
||||
IS
|
||||
'local_resources.id | ics_feed_resources.id'
|
||||
;
|
||||
|
||||
|
||||
-- _meta
|
||||
|
||||
UPDATE
|
||||
"_meta"
|
||||
SET
|
||||
"revision" = 'r4'
|
||||
;
|
||||
|
|
@ -150,7 +150,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "caldav_resources",
|
||||
"name": "ics_feed_resources",
|
||||
"key_field": {
|
||||
"name": "id"
|
||||
},
|
||||
|
|
@ -160,11 +160,6 @@
|
|||
"type": "string_medium",
|
||||
"nullable": false
|
||||
},
|
||||
{
|
||||
"name": "read_only",
|
||||
"type": "boolean",
|
||||
"nullable": false
|
||||
},
|
||||
{
|
||||
"name": "from_fucked_up_wordpress",
|
||||
"type": "boolean",
|
||||
|
|
@ -184,13 +179,13 @@
|
|||
"name": "kind",
|
||||
"type": "string_short",
|
||||
"nullable": false,
|
||||
"description": "»local« | »caldav«"
|
||||
"description": "»local« | »ics_feed«"
|
||||
},
|
||||
{
|
||||
"name": "sub_id",
|
||||
"type": "integer",
|
||||
"nullable": false,
|
||||
"description": "local_resources.id | caldav_resources.id"
|
||||
"description": "local_resources.id | ics_feed_resources.id"
|
||||
}
|
||||
],
|
||||
"constraints": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue