xyter/prisma/migrations/20230529131756_add_timestamps_for_cooldowns/migration.sql
Vermium Sifell 3cf88abfd0 feat: 🗃️ add createdAt & updatedAt fields for Cooldowns
Added timestamps for when a cooldown was created and last time updated
2023-05-29 17:31:17 +02:00

13 lines
549 B
SQL

/*
Warnings:
- The primary key for the `Cooldown` table will be changed. If it partially fails, the table could be left without primary key constraint.
- Added the required column `updatedAt` to the `Cooldown` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE `Cooldown` DROP PRIMARY KEY,
ADD COLUMN `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
ADD COLUMN `updatedAt` DATETIME(3) NOT NULL,
MODIFY `id` VARCHAR(191) NOT NULL,
ADD PRIMARY KEY (`id`);