From 53b9c7d6b4fd6b2ff0f680b83126431277709afe Mon Sep 17 00:00:00 2001 From: Fenris Wolf Date: Thu, 25 Sep 2025 17:05:35 +0200 Subject: [PATCH] [task-192] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Tasks - [192](https://vikunja.ramsch.sx/tasks/192) ## Zugehörige MRs - [backend](https://forgejo.ramsch.sx/misc/zeitbild-backend/pulls/1) - [frontend-dali](https://forgejo.ramsch.sx/misc/zeitbild-frontend-dali/pulls/1) Reviewed-on: https://forgejo.ramsch.sx/misc/zeitbild-datamodel/pulls/1 Co-authored-by: Fenris Wolf Co-committed-by: Fenris Wolf --- source/migrations/r3-r4.postgresql.sql | 49 ++++++++++++++++++++++++++ source/structure/r4.sindri.json | 16 ++++----- 2 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 source/migrations/r3-r4.postgresql.sql 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 41b5573..9ccc04c 100644 --- a/source/structure/r4.sindri.json +++ b/source/structure/r4.sindri.json @@ -63,6 +63,11 @@ "name": "email_address", "type": "string_medium", "nullable": true + }, + { + "name": "dav_token", + "type": "string_medium", + "nullable": true } ], "constraints": [ @@ -145,7 +150,7 @@ ] }, { - "name": "caldav_resources", + "name": "ics_feed_resources", "key_field": { "name": "id" }, @@ -155,11 +160,6 @@ "type": "string_medium", "nullable": false }, - { - "name": "read_only", - "type": "boolean", - "nullable": false - }, { "name": "from_fucked_up_wordpress", "type": "boolean", @@ -179,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": [