diff --git a/backend/src/db/migrations/20240930134623_secret-sharing-string-id.ts b/backend/src/db/migrations/20240930134623_secret-sharing-string-id.ts index 6cd1979151..69b8f7a83a 100644 --- a/backend/src/db/migrations/20240930134623_secret-sharing-string-id.ts +++ b/backend/src/db/migrations/20240930134623_secret-sharing-string-id.ts @@ -63,6 +63,9 @@ export async function down(knex: Knex): Promise { // Set the new column as primary key t.primary(["id"]); + + // Set the id column to use a UUID default + t.uuid("id").defaultTo(knex.raw("gen_random_uuid()")).notNullable().alter(); }); } }