From 46fd4ee31a8cd36d6e8549dcf247f393dfd6f085 Mon Sep 17 00:00:00 2001 From: Jim Hodapp Date: Sun, 15 Dec 2024 23:45:29 -0600 Subject: [PATCH] Fix the invalid type 'status' when inserting OverarchingGoals and Actions --- docs/db/refactor_platform_rs.dbml | 6 +++--- migration/src/refactor_platform_rs.sql | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/db/refactor_platform_rs.dbml b/docs/db/refactor_platform_rs.dbml index af25ac3..421f3bf 100644 --- a/docs/db/refactor_platform_rs.dbml +++ b/docs/db/refactor_platform_rs.dbml @@ -48,7 +48,7 @@ Table refactor_platform.overarching_goals { coaching_session_id uuid [note: 'The coaching session that an overarching goal is associated with'] title varchar [note: 'A short description of an overarching goal'] body varchar [note: 'Main text of the overarching goal supporting Markdown'] - status status [not null] + status refactor_platform.status [not null] status_changed_at timestamptz completed_at timestamptz [note: 'The date and time an overarching goal was completed'] created_at timestamptz [not null, default: `now()`] @@ -82,13 +82,13 @@ Table refactor_platform.actions { body varchar [note: 'Main text of the action supporting Markdown'] user_id uuid [not null, note: 'User that created (owns) the action'] due_by timestamptz - status status [not null] + status refactor_platform.status [not null] status_changed_at timestamptz [not null, default: `now()`] created_at timestamptz [not null, default: `now()`] updated_at timestamptz [not null, default: `now()`] } -enum status { +enum refactor_platform.status { not_started in_progress completed diff --git a/migration/src/refactor_platform_rs.sql b/migration/src/refactor_platform_rs.sql index ac200ce..c9d526b 100644 --- a/migration/src/refactor_platform_rs.sql +++ b/migration/src/refactor_platform_rs.sql @@ -1,9 +1,9 @@ -- SQL dump generated using DBML (dbml.dbdiagram.io) -- Database: PostgreSQL --- Generated at: 2024-12-03T17:35:25.615Z +-- Generated at: 2024-12-16T05:18:20.372Z -CREATE TYPE "status" AS ENUM ( +CREATE TYPE "refactor_platform"."status" AS ENUM ( 'not_started', 'in_progress', 'completed', @@ -55,7 +55,7 @@ CREATE TABLE "refactor_platform"."overarching_goals" ( "coaching_session_id" uuid, "title" varchar, "body" varchar, - "status" status NOT NULL, + "status" refactor_platform.status NOT NULL, "status_changed_at" timestamptz, "completed_at" timestamptz, "created_at" timestamptz NOT NULL DEFAULT (now()), @@ -86,7 +86,7 @@ CREATE TABLE "refactor_platform"."actions" ( "body" varchar, "user_id" uuid NOT NULL, "due_by" timestamptz, - "status" status NOT NULL, + "status" refactor_platform.status NOT NULL, "status_changed_at" timestamptz NOT NULL DEFAULT (now()), "created_at" timestamptz NOT NULL DEFAULT (now()), "updated_at" timestamptz NOT NULL DEFAULT (now())