Skip to content

Commit

Permalink
Merge pull request #42 from mapadoacolhimento/feat/add-boas-vindas-ch…
Browse files Browse the repository at this point in the history
…atbot-to-workflow

[MAPA-445] Criar tabelas feedback IAna
  • Loading branch information
vivianedias authored Dec 4, 2024
2 parents 516179f + 3f81848 commit 1472de9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/update-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
repositories: [lambda-pedido-acolhimento, cadastro-msr, lambda-confirmacao-disponibilidade]
repositories: [lambda-pedido-acolhimento, cadastro-msr, lambda-confirmacao-disponibilidade, boas-vindas-chatbot]
steps:
- name: Checkout current repository
uses: actions/checkout@v3
Expand All @@ -42,6 +42,9 @@ jobs:
if [ -d "./prisma/postgres/" ]; then
rm ./prisma/postgres/schema.prisma
cp -u ../postgres/schema.prisma ./prisma/postgres
elif [ -d "./packges/ui/prisma" ]; then
rm ./packges/ui/prisma/schema.prisma
cp -u ../postgres/schema.prisma ./packges/ui/prisma/postgres
else
rm ./prisma/schema.prisma
cp -u ../postgres/schema.prisma ./prisma
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- CreateSchema
CREATE SCHEMA IF NOT EXISTS "iana";

-- CreateTable
CREATE TABLE "iana"."iana_feedback" (
"id" SERIAL NOT NULL,
"created_at" TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"user_id" BIGINT NOT NULL,
"question" TEXT NOT NULL,
"answer" TEXT,

CONSTRAINT "iana_feedback_pkey" PRIMARY KEY ("id")
);
11 changes: 10 additions & 1 deletion postgres/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ generator client {
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
schemas = ["match", "public", "mobilization", "public_services", "msr", "pii_sec"]
schemas = ["match", "public", "mobilization", "public_services", "msr", "pii_sec", "iana"]
}

model auth_group {
Expand Down Expand Up @@ -783,3 +783,12 @@ enum VolunteerTrainingEvent {
@@map("volunteer_training_event")
@@schema("public")
}

model iana_feedback {
id Int @id @default(autoincrement())
created_at DateTime @default(now()) @db.Timestamp(6)
user_id BigInt
question String
answer String?
@@schema("iana")
}

0 comments on commit 1472de9

Please sign in to comment.