From 0fad493706f21f8d82594590d59900d714b3c4b4 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Mon, 20 Nov 2023 14:32:18 +0700
Subject: Change database from mysql to postgresql

---
 .../20231113070209_initial/migration.sql           | 78 ----------------------
 1 file changed, 78 deletions(-)
 delete mode 100644 prisma/migrations/20231113070209_initial/migration.sql

(limited to 'prisma/migrations/20231113070209_initial/migration.sql')

diff --git a/prisma/migrations/20231113070209_initial/migration.sql b/prisma/migrations/20231113070209_initial/migration.sql
deleted file mode 100644
index cf99541..0000000
--- a/prisma/migrations/20231113070209_initial/migration.sql
+++ /dev/null
@@ -1,78 +0,0 @@
--- CreateTable
-CREATE TABLE `Company` (
-    `id` INTEGER NOT NULL AUTO_INCREMENT,
-    `name` VARCHAR(191) NOT NULL,
-
-    PRIMARY KEY (`id`)
-) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
--- CreateTable
-CREATE TABLE `User` (
-    `id` INTEGER NOT NULL AUTO_INCREMENT,
-    `name` VARCHAR(191) NOT NULL,
-    `companyId` INTEGER NOT NULL,
-    `username` VARCHAR(191) NOT NULL,
-    `password` VARCHAR(191) NOT NULL,
-    `team` ENUM('COUNT1', 'COUNT2', 'COUNT3', 'VERIFICATION') NOT NULL,
-
-    UNIQUE INDEX `User_username_key`(`username`),
-    PRIMARY KEY (`id`)
-) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
--- CreateTable
-CREATE TABLE `Location` (
-    `id` INTEGER NOT NULL AUTO_INCREMENT,
-    `name` VARCHAR(191) NOT NULL,
-    `companyId` INTEGER NOT NULL,
-
-    PRIMARY KEY (`id`)
-) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
--- CreateTable
-CREATE TABLE `Product` (
-    `id` INTEGER NOT NULL AUTO_INCREMENT,
-    `barcode` VARCHAR(191) NOT NULL,
-    `itemCode` VARCHAR(191) NOT NULL,
-    `name` VARCHAR(191) NOT NULL,
-    `onhandQty` INTEGER NOT NULL,
-    `differenceQty` INTEGER NOT NULL,
-    `isDifferent` BOOLEAN NOT NULL,
-    `companyId` INTEGER NOT NULL,
-
-    PRIMARY KEY (`id`)
-) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
--- CreateTable
-CREATE TABLE `StockOpname` (
-    `id` INTEGER NOT NULL AUTO_INCREMENT,
-    `productId` INTEGER NOT NULL,
-    `locationId` INTEGER NOT NULL,
-    `companyId` INTEGER NOT NULL,
-    `userId` INTEGER NOT NULL,
-    `team` ENUM('COUNT1', 'COUNT2', 'COUNT3', 'VERIFICATION') NOT NULL,
-    `quantity` INTEGER NOT NULL,
-    `isDifferent` BOOLEAN NOT NULL,
-
-    PRIMARY KEY (`id`)
-) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
--- AddForeignKey
-ALTER TABLE `User` ADD CONSTRAINT `User_companyId_fkey` FOREIGN KEY (`companyId`) REFERENCES `Company`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE `Location` ADD CONSTRAINT `Location_companyId_fkey` FOREIGN KEY (`companyId`) REFERENCES `Company`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE `Product` ADD CONSTRAINT `Product_companyId_fkey` FOREIGN KEY (`companyId`) REFERENCES `Company`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE `StockOpname` ADD CONSTRAINT `StockOpname_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Product`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE `StockOpname` ADD CONSTRAINT `StockOpname_locationId_fkey` FOREIGN KEY (`locationId`) REFERENCES `Location`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE `StockOpname` ADD CONSTRAINT `StockOpname_companyId_fkey` FOREIGN KEY (`companyId`) REFERENCES `Company`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE `StockOpname` ADD CONSTRAINT `StockOpname_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-- 
cgit v1.2.3

