File tree Expand file tree Collapse file tree 6 files changed +73
-10
lines changed
20250310224816_modified_ticket_model_schema
20250310232247_modified_column_name_of_ticket_model
20250310232535_modify_ticket_model
20250310232907_modify_ticket_model
20250311050544_add_credential_column_to_ticket Expand file tree Collapse file tree 6 files changed +73
-10
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ Warnings:
3+
4+ - You are about to drop the column `checkinDate` on the `tickets` table. All the data in the column will be lost.
5+ - You are about to drop the column `isCheckin` on the `tickets` table. All the data in the column will be lost.
6+ - Added the required column `billing` to the `tickets` table without a default value. This is not possible if the table is not empty.
7+ - Added the required column `check_in_date` to the `tickets` table without a default value. This is not possible if the table is not empty.
8+ - Added the required column `is_check_in` to the `tickets` table without a default value. This is not possible if the table is not empty.
9+
10+ */
11+ -- AlterTable
12+ ALTER TABLE " tickets" DROP COLUMN " checkinDate" ,
13+ DROP COLUMN " isCheckin" ,
14+ ADD COLUMN " billing" BOOLEAN NOT NULL ,
15+ ADD COLUMN " check_in_date" TIMESTAMP (3 ) NOT NULL ,
16+ ADD COLUMN " is_check_in" BOOLEAN NOT NULL ,
17+ ALTER COLUMN " tier_id" DROP NOT NULL ;
Original file line number Diff line number Diff line change 1+ /*
2+ Warnings:
3+
4+ - You are about to drop the column `atendee` on the `tickets` table. All the data in the column will be lost.
5+ - Added the required column `attendee` to the `tickets` table without a default value. This is not possible if the table is not empty.
6+
7+ */
8+ -- AlterTable
9+ ALTER TABLE " tickets" DROP COLUMN " atendee" ,
10+ ADD COLUMN " attendee" TEXT NOT NULL ;
Original file line number Diff line number Diff line change 1+ /*
2+ Warnings:
3+
4+ - You are about to drop the column `billing` on the `tickets` table. All the data in the column will be lost.
5+
6+ */
7+ -- AlterTable
8+ ALTER TABLE " tickets" DROP COLUMN " billing" ,
9+ ADD COLUMN " paymentStat" BOOLEAN NOT NULL DEFAULT false,
10+ ADD COLUMN " paymetMethode" TEXT ,
11+ ALTER COLUMN " check_in_date" DROP NOT NULL ,
12+ ALTER COLUMN " is_check_in" SET DEFAULT false;
Original file line number Diff line number Diff line change 1+ /*
2+ Warnings:
3+
4+ - The primary key for the `tickets` table will be changed. If it partially fails, the table could be left without primary key constraint.
5+ - The `id` column on the `tickets` table would be dropped and recreated. This will lead to data loss if there is data in the column.
6+
7+ */
8+ -- AlterTable
9+ ALTER TABLE " tickets" DROP CONSTRAINT " tickets_pkey" ,
10+ ADD COLUMN " credential" TEXT ,
11+ DROP COLUMN " id" ,
12+ ADD COLUMN " id" SERIAL NOT NULL ,
13+ ADD CONSTRAINT " tickets_pkey" PRIMARY KEY (" id" );
Original file line number Diff line number Diff line change 1+ /*
2+ Warnings:
3+
4+ - A unique constraint covering the columns `[credential]` on the table `tickets` will be added. If there are existing duplicate values, this will fail.
5+
6+ */
7+ -- CreateIndex
8+ CREATE UNIQUE INDEX "tickets_credential_key " ON " tickets" (" credential" );
Original file line number Diff line number Diff line change @@ -189,16 +189,19 @@ model TierBenefit {
189189}
190190
191191model Ticket {
192- id String @id
193- atendee String
194- email String
195- phone String
196- isCheckin Boolean
197- checkinDate DateTime
198- createdAt DateTime @default (now () ) @map (" created_at " )
199- updatedAt DateTime @default (now () ) @map (" updated_at " )
200- tierId Int @map (" tier_id " )
201- tier Tier @relation (fields : [tierId ] , references : [id ] , onDelete : Cascade )
192+ id Int @id @default (autoincrement () )
193+ credential String ? @unique ()
194+ attendee String
195+ email String
196+ phone String
197+ paymentStat Boolean @default (false )
198+ paymetMethode String ?
199+ isCheckin Boolean @default (false ) @map (" is_check_in " )
200+ checkinDate DateTime ? @map (" check_in_date " )
201+ createdAt DateTime @default (now () ) @map (" created_at " )
202+ updatedAt DateTime @default (now () ) @map (" updated_at " )
203+ tierId Int ? @map (" tier_id " )
204+ tier Tier ? @relation (fields : [tierId ] , references : [id ] , onDelete : Cascade )
202205
203206 @@map (" tickets " )
204207}
You can’t perform that action at this time.
0 commit comments