update: tournament date field type

This commit is contained in:
MTG2000
2022-09-07 11:35:13 +03:00
parent 1a92252ea0
commit 9062e040ff
2 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
/*
Warnings:
- You are about to drop the column `date` on the `TournamentEvent` table. All the data in the column will be lost.
- Added the required column `ends_at` to the `TournamentEvent` table without a default value. This is not possible if the table is not empty.
- Added the required column `starts_at` to the `TournamentEvent` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "TournamentEvent" DROP COLUMN "date",
ADD COLUMN "ends_at" DATE NOT NULL,
ADD COLUMN "starts_at" DATE NOT NULL;

View File

@@ -333,7 +333,8 @@ model TournamentEvent {
title String
image String
description String
date DateTime @db.Date
starts_at DateTime @db.Date
ends_at DateTime @db.Date
location String
website String
type Int