Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAPA-445] Criar tabelas feedback IAna #42

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
}
Loading