diff --git a/Dockerfile b/Dockerfile index 0528a96..6918384 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,11 @@ ENV DATABASE_URL_DEV="postgresql://apptargo:6wLAZrb0HZnd3mrmqXiArPcqLyui0o9e@10. ENV AUTHENTIK_ISSUER="https://auth.targo.ca/application/o/montargo/" ENV AUTHENTIK_CLIENT_ID="KUmSmvpu2aDDy4JfNwas7XriNFtPcj2Ka2PyLO5v" ENV AUTHENTIK_CLIENT_SECRET="N55BgX1mxT7eiY99LOo5zXr5cKz9FgTsaCA9MdC7D8ZuhOGqozvqtNXVGbpY1eCg2kkYwJeJLP89sQ8R4cYybIJI7EwKijb19bzZQpUPwBosWwG3irUwdTnZOyw8yW5i" + +ARG DB_URL ARG CALLBACK_URL ENV AUTHENTIK_CALLBACK_URL=$CALLBACK_URL +ENV DATABASE_URL=$DB_URL #ENV AUTHENTIK_CALLBACK_URL="http://10.100.251.2:3420/auth/callback" ENV AUTHENTIK_AUTH_URL="https://auth.targo.ca/application/o/authorize/" ENV AUTHENTIK_TOKEN_URL="https://auth.targo.ca/application/o/token/" diff --git a/prisma/migrations/20260114205737_prod_db_setup_v1/migration.sql b/prisma/migrations/20260114205737_prod_db_setup_v1/migration.sql new file mode 100644 index 0000000..eb2d0c0 --- /dev/null +++ b/prisma/migrations/20260114205737_prod_db_setup_v1/migration.sql @@ -0,0 +1,8 @@ +-- AlterEnum +ALTER TYPE "modules" ADD VALUE 'chatbot'; + +-- AlterTable +ALTER TABLE "paid_time_off" ALTER COLUMN "last_updated" DROP NOT NULL; + +-- AlterTable +ALTER TABLE "user_module_access" ADD COLUMN "chatbot" BOOLEAN NOT NULL DEFAULT false; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index f5225ed..01d5eba 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -5,7 +5,7 @@ generator client { datasource db { provider = "postgresql" - url = env("DATABASE_URL_STAGING") + url = env("DATABASE_URL") } model Users { @@ -15,7 +15,7 @@ model Users { email String @unique phone_number String residence String? - role Roles @default(GUEST) + role Roles @default(EMPLOYEE) employee Employees? @relation("UserEmployee") oauth_sessions OAuthSessions[] @relation("UserOAuthSessions") preferences Preferences? @relation("UserPreferences") @@ -27,12 +27,12 @@ model Users { model userModuleAccess { id Int @id @default(autoincrement()) user_id String @unique @db.Uuid - timesheets Boolean @default(false) + timesheets Boolean @default(true) timesheets_approval Boolean @default(false) - employee_list Boolean @default(false) + employee_list Boolean @default(true) employee_management Boolean @default(false) - personal_profile Boolean @default(false) - dashboard Boolean @default(false) + personal_profile Boolean @default(true) + dashboard Boolean @default(true) chatbot Boolean @default(false) user Users @relation("UserModuleAccess", fields: [user_id], references: [id])