tonid
tonid
DTDrizzle Team
Created by tonid on 9/13/2023 in #help
PostgresError: null value in column "id" of relation "pairs" violates not-null constraint
Everything works now. Thanks a lot !
16 replies
DTDrizzle Team
Created by tonid on 9/13/2023 in #help
PostgresError: null value in column "id" of relation "pairs" violates not-null constraint
at least ts , will see for default now
16 replies
DTDrizzle Team
Created by tonid on 9/13/2023 in #help
PostgresError: null value in column "id" of relation "pairs" violates not-null constraint
Updated it and it works now 🙂
16 replies
DTDrizzle Team
Created by tonid on 9/13/2023 in #help
PostgresError: null value in column "id" of relation "pairs" violates not-null constraint
Thanks! Yes its likely something that directus does on its level. When i try to do it as you showed i get ts error:
Property '$default' does not exist on type 'NotNull<NotNull<PgUUIDBuilderInitial<"id">>>'. Did you mean 'default'?
Property '$default' does not exist on type 'NotNull<NotNull<PgUUIDBuilderInitial<"id">>>'. Did you mean 'default'?
16 replies
DTDrizzle Team
Created by tonid on 9/13/2023 in #help
PostgresError: null value in column "id" of relation "pairs" violates not-null constraint
No description
16 replies
DTDrizzle Team
Created by tonid on 9/13/2023 in #help
PostgresError: null value in column "id" of relation "pairs" violates not-null constraint
No description
16 replies
DTDrizzle Team
Created by tonid on 9/13/2023 in #help
PostgresError: null value in column "id" of relation "pairs" violates not-null constraint
Query: insert into "pairs" ("id", "person_a", "person_b", "has_liked") values (default, $1, $2, $3) returning "id", "person_a", "person_b", "has_liked" -- params: ["ff35ae6f-5ea5-4d50-9d7a-7dc9a01cffd3", "8ff4da6e-ad8e-45be-bb7e-dd7a0f7fe637", false]
Query: insert into "pairs" ("id", "person_a", "person_b", "has_liked") values (default, $1, $2, $3) returning "id", "person_a", "person_b", "has_liked" -- params: ["ff35ae6f-5ea5-4d50-9d7a-7dc9a01cffd3", "8ff4da6e-ad8e-45be-bb7e-dd7a0f7fe637", false]
16 replies
DTDrizzle Team
Created by tonid on 9/13/2023 in #help
PostgresError: null value in column "id" of relation "pairs" violates not-null constraint
That makes sense. However, I think that changing the database like that would: - Delete tables that I removed from the schema, which Directus uses internally. - Potentially create a change in some table that Directus doesn't know how to deal with. My idea was to use Directus to create tables, generate schema using introspect with drizzle-kit, cleanup the schema and then manually keep it in sync with database
16 replies