Sisa 1 Tabs aja yang data kesehatan warga
This commit is contained in:
92
prisma/migrations/20250626061909_26_jun_25_01/migration.sql
Normal file
92
prisma/migrations/20250626061909_26_jun_25_01/migration.sql
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- The primary key for the `ArtikelKesehatan` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- The primary key for the `DoctorSign` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- The primary key for the `FirstAid` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- The primary key for the `Introduction` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- The primary key for the `MythVsFact` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- The primary key for the `Prevention` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- The primary key for the `Symptom` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- Added the required column `deskripsiJadwalKegiatanId` to the `JadwalKegiatan` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `dokumenJadwalKegiatanId` to the `JadwalKegiatan` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `informasiJadwalKegiatanId` to the `JadwalKegiatan` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `layananJadwalKegiatanId` to the `JadwalKegiatan` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `pendaftaranJadwalKegiatanId` to the `JadwalKegiatan` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `syaratKetentuanJadwalKegiatanId` to the `JadwalKegiatan` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "ArtikelKesehatan" DROP CONSTRAINT "ArtikelKesehatan_pkey",
|
||||
ALTER COLUMN "id" DROP DEFAULT,
|
||||
ALTER COLUMN "id" SET DATA TYPE TEXT,
|
||||
ADD CONSTRAINT "ArtikelKesehatan_pkey" PRIMARY KEY ("id");
|
||||
DROP SEQUENCE "ArtikelKesehatan_id_seq";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "DoctorSign" DROP CONSTRAINT "DoctorSign_pkey",
|
||||
ALTER COLUMN "id" DROP DEFAULT,
|
||||
ALTER COLUMN "id" SET DATA TYPE TEXT,
|
||||
ADD CONSTRAINT "DoctorSign_pkey" PRIMARY KEY ("id");
|
||||
DROP SEQUENCE "DoctorSign_id_seq";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "FirstAid" DROP CONSTRAINT "FirstAid_pkey",
|
||||
ALTER COLUMN "id" DROP DEFAULT,
|
||||
ALTER COLUMN "id" SET DATA TYPE TEXT,
|
||||
ADD CONSTRAINT "FirstAid_pkey" PRIMARY KEY ("id");
|
||||
DROP SEQUENCE "FirstAid_id_seq";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Introduction" DROP CONSTRAINT "Introduction_pkey",
|
||||
ALTER COLUMN "id" DROP DEFAULT,
|
||||
ALTER COLUMN "id" SET DATA TYPE TEXT,
|
||||
ADD CONSTRAINT "Introduction_pkey" PRIMARY KEY ("id");
|
||||
DROP SEQUENCE "Introduction_id_seq";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "JadwalKegiatan" ADD COLUMN "deskripsiJadwalKegiatanId" TEXT NOT NULL,
|
||||
ADD COLUMN "dokumenJadwalKegiatanId" TEXT NOT NULL,
|
||||
ADD COLUMN "informasiJadwalKegiatanId" TEXT NOT NULL,
|
||||
ADD COLUMN "layananJadwalKegiatanId" TEXT NOT NULL,
|
||||
ADD COLUMN "pendaftaranJadwalKegiatanId" TEXT NOT NULL,
|
||||
ADD COLUMN "syaratKetentuanJadwalKegiatanId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "MythVsFact" DROP CONSTRAINT "MythVsFact_pkey",
|
||||
ALTER COLUMN "id" DROP DEFAULT,
|
||||
ALTER COLUMN "id" SET DATA TYPE TEXT,
|
||||
ADD CONSTRAINT "MythVsFact_pkey" PRIMARY KEY ("id");
|
||||
DROP SEQUENCE "MythVsFact_id_seq";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Prevention" DROP CONSTRAINT "Prevention_pkey",
|
||||
ALTER COLUMN "id" DROP DEFAULT,
|
||||
ALTER COLUMN "id" SET DATA TYPE TEXT,
|
||||
ADD CONSTRAINT "Prevention_pkey" PRIMARY KEY ("id");
|
||||
DROP SEQUENCE "Prevention_id_seq";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Symptom" DROP CONSTRAINT "Symptom_pkey",
|
||||
ALTER COLUMN "id" DROP DEFAULT,
|
||||
ALTER COLUMN "id" SET DATA TYPE TEXT,
|
||||
ADD CONSTRAINT "Symptom_pkey" PRIMARY KEY ("id");
|
||||
DROP SEQUENCE "Symptom_id_seq";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "JadwalKegiatan" ADD CONSTRAINT "JadwalKegiatan_informasiJadwalKegiatanId_fkey" FOREIGN KEY ("informasiJadwalKegiatanId") REFERENCES "InformasiJadwalKegiatan"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "JadwalKegiatan" ADD CONSTRAINT "JadwalKegiatan_deskripsiJadwalKegiatanId_fkey" FOREIGN KEY ("deskripsiJadwalKegiatanId") REFERENCES "DeskripsiJadwalKegiatan"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "JadwalKegiatan" ADD CONSTRAINT "JadwalKegiatan_layananJadwalKegiatanId_fkey" FOREIGN KEY ("layananJadwalKegiatanId") REFERENCES "LayananJadwalKegiatan"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "JadwalKegiatan" ADD CONSTRAINT "JadwalKegiatan_syaratKetentuanJadwalKegiatanId_fkey" FOREIGN KEY ("syaratKetentuanJadwalKegiatanId") REFERENCES "SyaratKetentuanJadwalKegiatan"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "JadwalKegiatan" ADD CONSTRAINT "JadwalKegiatan_dokumenJadwalKegiatanId_fkey" FOREIGN KEY ("dokumenJadwalKegiatanId") REFERENCES "DokumenJadwalKegiatan"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "JadwalKegiatan" ADD CONSTRAINT "JadwalKegiatan_pendaftaranJadwalKegiatanId_fkey" FOREIGN KEY ("pendaftaranJadwalKegiatanId") REFERENCES "PendaftaranJadwalKegiatan"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@@ -560,6 +560,18 @@ model TarifDanLayanan {
|
||||
model JadwalKegiatan {
|
||||
id String @id @default(cuid())
|
||||
content String
|
||||
informasijadwalkegiatan InformasiJadwalKegiatan @relation(fields: [informasiJadwalKegiatanId], references: [id])
|
||||
informasiJadwalKegiatanId String
|
||||
deskripsijadwalkegiatan DeskripsiJadwalKegiatan @relation(fields: [deskripsiJadwalKegiatanId], references: [id])
|
||||
deskripsiJadwalKegiatanId String
|
||||
layananjadwalkegiatan LayananJadwalKegiatan @relation(fields: [layananJadwalKegiatanId], references: [id])
|
||||
layananJadwalKegiatanId String
|
||||
syaratketentuanjadwalkegiatan SyaratKetentuanJadwalKegiatan @relation(fields: [syaratKetentuanJadwalKegiatanId], references: [id])
|
||||
syaratKetentuanJadwalKegiatanId String
|
||||
dokumenjadwalkegiatan DokumenJadwalKegiatan @relation(fields: [dokumenJadwalKegiatanId], references: [id])
|
||||
dokumenJadwalKegiatanId String
|
||||
pendaftaranjadwalkegiatan PendaftaranJadwalKegiatan @relation(fields: [pendaftaranJadwalKegiatanId], references: [id])
|
||||
pendaftaranJadwalKegiatanId String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime @default(now())
|
||||
@@ -576,6 +588,7 @@ model InformasiJadwalKegiatan {
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime @default(now())
|
||||
isActive Boolean @default(true)
|
||||
JadwalKegiatan JadwalKegiatan[]
|
||||
}
|
||||
|
||||
model DeskripsiJadwalKegiatan {
|
||||
@@ -585,6 +598,7 @@ model DeskripsiJadwalKegiatan {
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime @default(now())
|
||||
isActive Boolean @default(true)
|
||||
JadwalKegiatan JadwalKegiatan[]
|
||||
}
|
||||
|
||||
model LayananJadwalKegiatan {
|
||||
@@ -594,6 +608,8 @@ model LayananJadwalKegiatan {
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime @default(now())
|
||||
isActive Boolean @default(true)
|
||||
|
||||
JadwalKegiatan JadwalKegiatan[]
|
||||
}
|
||||
|
||||
model SyaratKetentuanJadwalKegiatan {
|
||||
@@ -603,6 +619,8 @@ model SyaratKetentuanJadwalKegiatan {
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime @default(now())
|
||||
isActive Boolean @default(true)
|
||||
|
||||
JadwalKegiatan JadwalKegiatan[]
|
||||
}
|
||||
|
||||
model DokumenJadwalKegiatan {
|
||||
@@ -612,6 +630,7 @@ model DokumenJadwalKegiatan {
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime @default(now())
|
||||
isActive Boolean @default(true)
|
||||
JadwalKegiatan JadwalKegiatan[]
|
||||
}
|
||||
|
||||
model PendaftaranJadwalKegiatan {
|
||||
@@ -626,6 +645,7 @@ model PendaftaranJadwalKegiatan {
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime @default(now())
|
||||
isActive Boolean @default(true)
|
||||
JadwalKegiatan JadwalKegiatan[]
|
||||
}
|
||||
|
||||
// ========================================= PERSENTASE KELAHIRAN & KEMATIAN ========================================= //
|
||||
@@ -656,7 +676,7 @@ model GrafikKepuasan {
|
||||
|
||||
// ========================================= ARTIKEL KESEHATAN ========================================= //
|
||||
model ArtikelKesehatan {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
content String
|
||||
createdAt DateTime @default(now())
|
||||
@@ -666,7 +686,7 @@ model ArtikelKesehatan {
|
||||
}
|
||||
|
||||
model Introduction {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id @default(cuid())
|
||||
content String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
@@ -675,7 +695,7 @@ model Introduction {
|
||||
}
|
||||
|
||||
model Symptom {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
content String
|
||||
createdAt DateTime @default(now())
|
||||
@@ -685,7 +705,7 @@ model Symptom {
|
||||
}
|
||||
|
||||
model Prevention {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
content String
|
||||
createdAt DateTime @default(now())
|
||||
@@ -695,7 +715,7 @@ model Prevention {
|
||||
}
|
||||
|
||||
model FirstAid {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
content String
|
||||
createdAt DateTime @default(now())
|
||||
@@ -705,7 +725,7 @@ model FirstAid {
|
||||
}
|
||||
|
||||
model MythVsFact {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
mitos String
|
||||
fakta String
|
||||
@@ -716,7 +736,7 @@ model MythVsFact {
|
||||
}
|
||||
|
||||
model DoctorSign {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id @default(cuid())
|
||||
content String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
Reference in New Issue
Block a user