add matcher domain, set domain as string instead of enum in db

This commit is contained in:
sbriat 2023-05-24 14:38:12 +02:00
parent 169941348c
commit 6f73940273
3 changed files with 3 additions and 9 deletions

View File

@ -1,10 +1,7 @@
-- CreateEnum
CREATE TYPE "Domain" AS ENUM ('USER');
-- CreateTable -- CreateTable
CREATE TABLE "configuration" ( CREATE TABLE "configuration" (
"uuid" UUID NOT NULL, "uuid" UUID NOT NULL,
"domain" "Domain" NOT NULL, "domain" TEXT NOT NULL,
"key" TEXT NOT NULL, "key" TEXT NOT NULL,
"value" TEXT NOT NULL, "value" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

View File

@ -12,7 +12,7 @@ datasource db {
model Configuration { model Configuration {
uuid String @id @default(uuid()) @db.Uuid uuid String @id @default(uuid()) @db.Uuid
domain Domain domain String
key String key String
value String value String
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@ -21,7 +21,3 @@ model Configuration {
@@unique([domain, key]) @@unique([domain, key])
@@map("configuration") @@map("configuration")
} }
enum Domain {
USER
}

View File

@ -1,3 +1,4 @@
export enum Domain { export enum Domain {
USER = 'USER', USER = 'USER',
MATCHER = 'MATCHER',
} }