From b1a9e09396a9cdd102541aadf57d19cd90681f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=87=E8=B6=A3=E4=BF=9D=E7=BD=97?= Date: Sat, 23 Apr 2022 17:15:25 +0800 Subject: [PATCH] Chore: DB Migrations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prisma 的数据库生成记录 --- .../migrations/20220423091127_init/migration.sql | 16 ++++++++++++++++ prisma/migrations/migration_lock.toml | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 prisma/migrations/20220423091127_init/migration.sql create mode 100644 prisma/migrations/migration_lock.toml diff --git a/prisma/migrations/20220423091127_init/migration.sql b/prisma/migrations/20220423091127_init/migration.sql new file mode 100644 index 0000000..49f7630 --- /dev/null +++ b/prisma/migrations/20220423091127_init/migration.sql @@ -0,0 +1,16 @@ +-- CreateTable +CREATE TABLE `ACGM` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `title` VARCHAR(191) NULL, + `artist` VARCHAR(191) NULL, + `album` VARCHAR(191) NULL, + `alias` VARCHAR(191) NULL, + `bangumi` VARCHAR(191) NULL, + `music_id` INTEGER NOT NULL, + `created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `enabled` BOOLEAN NOT NULL DEFAULT true, + `updated_at` DATETIME(3) NULL, + + UNIQUE INDEX `ACGM_music_id_key`(`music_id`), + 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 100644 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