middle
This commit is contained in:
18
prisma/migrations/20250908172816_0908new/migration.sql
Normal file
18
prisma/migrations/20250908172816_0908new/migration.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `premiumViews` on the `content` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `validViews` on the `content` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `views` on the `content` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `watchTime` on the `content` table. All the data in the column will be lost.
|
||||
- You are about to drop the `costPerView` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE `content` DROP COLUMN `premiumViews`,
|
||||
DROP COLUMN `validViews`,
|
||||
DROP COLUMN `views`,
|
||||
DROP COLUMN `watchTime`;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE `costPerView`;
|
||||
49
prisma/migrations/20250908173757_0908new02/migration.sql
Normal file
49
prisma/migrations/20250908173757_0908new02/migration.sql
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `ContentHandle` table. If the table is not empty, all the data it contains will be lost.
|
||||
- You are about to drop the `userHandle` table. If the table is not empty, all the data it contains will be lost.
|
||||
- Added the required column `handleId` to the `content` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `ContentHandle` DROP FOREIGN KEY `ContentHandle_contentId_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `ContentHandle` DROP FOREIGN KEY `ContentHandle_handle_fkey`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `content` ADD COLUMN `handleId` VARCHAR(191) NOT NULL;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE `ContentHandle`;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE `userHandle`;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `user` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`email` VARCHAR(191) NOT NULL,
|
||||
`icon` VARCHAR(191) NOT NULL DEFAULT '',
|
||||
`isApproved` BOOLEAN NOT NULL DEFAULT false,
|
||||
`createtime` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `handle` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`handle` VARCHAR(191) NOT NULL,
|
||||
`userId` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `handle_handle_key`(`handle`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `content` ADD CONSTRAINT `content_handleId_fkey` FOREIGN KEY (`handleId`) REFERENCES `handle`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `handle` ADD CONSTRAINT `handle_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user