diff --git a/source/migrations/r3-r4.postgresql.sql b/source/migrations/r3-r4.postgresql.sql new file mode 100644 index 0000000..6366936 --- /dev/null +++ b/source/migrations/r3-r4.postgresql.sql @@ -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' +; diff --git a/source/structure/r4.sindri.json b/source/structure/r4.sindri.json index f3ae8db..9ccc04c 100644 --- a/source/structure/r4.sindri.json +++ b/source/structure/r4.sindri.json @@ -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": [