26 lines
997 B
SQL
26 lines
997 B
SQL
/*
|
|
Warnings:
|
|
|
|
- You are about to drop the column `altenatif` on the `subKriteria` table. All the data in the column will be lost.
|
|
- Added the required column `alternatif` to the `subKriteria` table without a default value. This is not possible if the table is not empty.
|
|
|
|
*/
|
|
-- RedefineTables
|
|
PRAGMA defer_foreign_keys=ON;
|
|
PRAGMA foreign_keys=OFF;
|
|
CREATE TABLE "new_subKriteria" (
|
|
"id" TEXT NOT NULL PRIMARY KEY,
|
|
"alternatif" TEXT NOT NULL,
|
|
"codeId" TEXT NOT NULL,
|
|
"C1" INTEGER NOT NULL,
|
|
"C2" INTEGER NOT NULL,
|
|
"C3" INTEGER NOT NULL,
|
|
"C4" INTEGER NOT NULL,
|
|
CONSTRAINT "subKriteria_codeId_fkey" FOREIGN KEY ("codeId") REFERENCES "Kriteria" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
|
);
|
|
INSERT INTO "new_subKriteria" ("C1", "C2", "C3", "C4", "codeId", "id") SELECT "C1", "C2", "C3", "C4", "codeId", "id" FROM "subKriteria";
|
|
DROP TABLE "subKriteria";
|
|
ALTER TABLE "new_subKriteria" RENAME TO "subKriteria";
|
|
PRAGMA foreign_keys=ON;
|
|
PRAGMA defer_foreign_keys=OFF;
|