diff --git a/.github/dependabot.yml b/.github/dependabot.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml old mode 100644 new mode 100755 diff --git a/package-lock.json b/package-lock.json old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 diff --git a/prisma/migrations/20240531104818_init_db_aiven/migration.sql b/prisma/migrations/20240531104818_init_db_aiven/migration.sql new file mode 100755 index 0000000..94ec012 --- /dev/null +++ b/prisma/migrations/20240531104818_init_db_aiven/migration.sql @@ -0,0 +1,121 @@ +-- CreateTable +CREATE TABLE `Store` ( + `id` VARCHAR(191) NOT NULL, + `name` VARCHAR(191) NOT NULL, + `userId` VARCHAR(191) NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Billboard` ( + `id` VARCHAR(191) NOT NULL, + `storeId` VARCHAR(191) NOT NULL, + `label` VARCHAR(191) NOT NULL, + `imageUrl` VARCHAR(191) NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + INDEX `Billboard_storeId_idx`(`storeId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Category` ( + `id` VARCHAR(191) NOT NULL, + `storeId` VARCHAR(191) NOT NULL, + `billboardId` VARCHAR(191) NOT NULL, + `name` VARCHAR(191) NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + INDEX `Category_storeId_idx`(`storeId`), + INDEX `Category_billboardId_idx`(`billboardId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Size` ( + `id` VARCHAR(191) NOT NULL, + `storeId` VARCHAR(191) NOT NULL, + `name` VARCHAR(191) NOT NULL, + `value` VARCHAR(191) NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + INDEX `Size_storeId_idx`(`storeId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Color` ( + `id` VARCHAR(191) NOT NULL, + `storeId` VARCHAR(191) NOT NULL, + `name` VARCHAR(191) NOT NULL, + `value` VARCHAR(191) NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + INDEX `Color_storeId_idx`(`storeId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Product` ( + `id` VARCHAR(191) NOT NULL, + `storeId` VARCHAR(191) NOT NULL, + `categoryId` VARCHAR(191) NOT NULL, + `name` VARCHAR(191) NOT NULL, + `price` DECIMAL(65, 30) NOT NULL, + `isFeatured` BOOLEAN NOT NULL DEFAULT false, + `isArchived` BOOLEAN NOT NULL DEFAULT false, + `sizeId` VARCHAR(191) NOT NULL, + `colorId` VARCHAR(191) NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + INDEX `Product_storeId_idx`(`storeId`), + INDEX `Product_categoryId_idx`(`categoryId`), + INDEX `Product_sizeId_idx`(`sizeId`), + INDEX `Product_colorId_idx`(`colorId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Image` ( + `id` VARCHAR(191) NOT NULL, + `productId` VARCHAR(191) NOT NULL, + `url` VARCHAR(191) NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + INDEX `Image_productId_idx`(`productId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Order` ( + `id` VARCHAR(191) NOT NULL, + `storeId` VARCHAR(191) NOT NULL, + `isPaid` BOOLEAN NOT NULL DEFAULT false, + `phone` VARCHAR(191) NOT NULL DEFAULT '', + `address` VARCHAR(191) NOT NULL DEFAULT '', + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + INDEX `Order_storeId_idx`(`storeId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `OrderItem` ( + `id` VARCHAR(191) NOT NULL, + `orderId` VARCHAR(191) NOT NULL, + `productId` VARCHAR(191) NOT NULL, + + INDEX `OrderItem_orderId_idx`(`orderId`), + INDEX `OrderItem_productId_idx`(`productId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100755 index 0000000..e5a788a --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "mysql" \ No newline at end of file