diff --git a/prisma/migrations/20220907083457_update_tournament_event_date_field/migration.sql b/prisma/migrations/20220907083457_update_tournament_event_date_field/migration.sql new file mode 100644 index 0000000..777faca --- /dev/null +++ b/prisma/migrations/20220907083457_update_tournament_event_date_field/migration.sql @@ -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; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 87b4d2a..0eeec07 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -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