update
This commit is contained in:
44
prisma/migrations/20250329030839_init/migration.sql
Normal file
44
prisma/migrations/20250329030839_init/migration.sql
Normal file
@@ -0,0 +1,44 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "Account" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"type" BIGINT,
|
||||
"firstName" BIGINT,
|
||||
"lastName" BIGINT,
|
||||
"email" BIGINT,
|
||||
"phone" BIGINT,
|
||||
"company" BIGINT,
|
||||
"password" BIGINT
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "JobPost" (
|
||||
"id" BIGINT NOT NULL PRIMARY KEY,
|
||||
"businessId" INTEGER,
|
||||
"heading" BIGINT,
|
||||
"description" BIGINT,
|
||||
"locationText" BIGINT,
|
||||
"locationLongLat" BIGINT,
|
||||
"field" BIGINT,
|
||||
"contractType" BIGINT,
|
||||
"payRange" BIGINT,
|
||||
"hours" BIGINT,
|
||||
"createdAt" BIGINT,
|
||||
"endingAtTime" BIGINT
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "AccountInformation" (
|
||||
"id" BIGINT NOT NULL PRIMARY KEY,
|
||||
"sex" BIGINT,
|
||||
"age" BIGINT,
|
||||
"suburb" BIGINT,
|
||||
"postcode" BIGINT,
|
||||
"state" BIGINT,
|
||||
"searchPostcode" BIGINT,
|
||||
"searchRadius" BIGINT,
|
||||
"accountId" INTEGER NOT NULL,
|
||||
CONSTRAINT "AccountInformation_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "AccountInformation_accountId_key" ON "AccountInformation"("accountId");
|
||||
43
prisma/migrations/20250329033214_init/migration.sql
Normal file
43
prisma/migrations/20250329033214_init/migration.sql
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to alter the column `phone` on the `Account` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- The primary key for the `AccountInformation` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- You are about to alter the column `age` on the `AccountInformation` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
- You are about to alter the column `id` on the `AccountInformation` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`.
|
||||
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Account" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"type" TEXT,
|
||||
"firstName" TEXT,
|
||||
"lastName" TEXT,
|
||||
"email" TEXT,
|
||||
"phone" INTEGER,
|
||||
"company" TEXT,
|
||||
"password" TEXT
|
||||
);
|
||||
INSERT INTO "new_Account" ("company", "email", "firstName", "id", "lastName", "password", "phone", "type") SELECT "company", "email", "firstName", "id", "lastName", "password", "phone", "type" FROM "Account";
|
||||
DROP TABLE "Account";
|
||||
ALTER TABLE "new_Account" RENAME TO "Account";
|
||||
CREATE TABLE "new_AccountInformation" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"sex" TEXT,
|
||||
"age" INTEGER,
|
||||
"suburb" BIGINT,
|
||||
"postcode" BIGINT,
|
||||
"state" BIGINT,
|
||||
"searchPostcode" BIGINT,
|
||||
"searchRadius" BIGINT,
|
||||
"accountId" INTEGER NOT NULL,
|
||||
CONSTRAINT "AccountInformation_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_AccountInformation" ("accountId", "age", "id", "postcode", "searchPostcode", "searchRadius", "sex", "state", "suburb") SELECT "accountId", "age", "id", "postcode", "searchPostcode", "searchRadius", "sex", "state", "suburb" FROM "AccountInformation";
|
||||
DROP TABLE "AccountInformation";
|
||||
ALTER TABLE "new_AccountInformation" RENAME TO "AccountInformation";
|
||||
CREATE UNIQUE INDEX "AccountInformation_accountId_key" ON "AccountInformation"("accountId");
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
8
prisma/migrations/20250329033745_init/migration.sql
Normal file
8
prisma/migrations/20250329033745_init/migration.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[email]` on the table `Account` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Account_email_key" ON "Account"("email");
|
||||
3
prisma/migrations/migration_lock.toml
Normal file
3
prisma/migrations/migration_lock.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
# Please do not edit this file manually
|
||||
# It should be added in your version-control system (e.g., Git)
|
||||
provider = "sqlite"
|
||||
Reference in New Issue
Block a user