CalDAV #1
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'
|
||||||
|
;
|
||||||
|
|
@ -63,6 +63,11 @@
|
||||||
"name": "email_address",
|
"name": "email_address",
|
||||||
"type": "string_medium",
|
"type": "string_medium",
|
||||||
"nullable": true
|
"nullable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dav_token",
|
||||||
|
"type": "string_medium",
|
||||||
|
"nullable": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"constraints": [
|
"constraints": [
|
||||||
|
|
@ -145,7 +150,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "caldav_resources",
|
"name": "ics_feed_resources",
|
||||||
"key_field": {
|
"key_field": {
|
||||||
"name": "id"
|
"name": "id"
|
||||||
},
|
},
|
||||||
|
|
@ -155,11 +160,6 @@
|
||||||
"type": "string_medium",
|
"type": "string_medium",
|
||||||
"nullable": false
|
"nullable": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "read_only",
|
|
||||||
"type": "boolean",
|
|
||||||
"nullable": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "from_fucked_up_wordpress",
|
"name": "from_fucked_up_wordpress",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
@ -179,13 +179,13 @@
|
||||||
"name": "kind",
|
"name": "kind",
|
||||||
"type": "string_short",
|
"type": "string_short",
|
||||||
"nullable": false,
|
"nullable": false,
|
||||||
"description": "»local« | »caldav«"
|
"description": "»local« | »ics_feed«"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sub_id",
|
"name": "sub_id",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"nullable": false,
|
"nullable": false,
|
||||||
"description": "local_resources.id | caldav_resources.id"
|
"description": "local_resources.id | ics_feed_resources.id"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"constraints": [
|
"constraints": [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue