Skip to content

Commit 6fb8184

Browse files
committed
needed changes in seeder
1 parent 74b66ed commit 6fb8184

File tree

1 file changed

+4
-4
lines changed
  • TableBookingAPI/TableBooking.Model/Seed

1 file changed

+4
-4
lines changed

TableBookingAPI/TableBooking.Model/Seed/seed.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
ALTER ROLE "TableBookingUser" SET search_path = public;
2-
32
-- Create Restaurants table
43
CREATE TABLE IF NOT EXISTS "Restaurants" (
54
"Id" UUID PRIMARY KEY,
@@ -57,8 +56,9 @@ CREATE TABLE IF NOT EXISTS "Users" (
5756
CREATE TABLE IF NOT EXISTS "Bookings" (
5857
"Id" UUID PRIMARY KEY,
5958
"Date" TIMESTAMPTZ,
59+
"AmountOfPeople" INT,
6060
"DurationInMinutes" INT,
61-
"UserId" UUID REFERENCES "Users"("Id"),
61+
"AppUserId" UUID REFERENCES "Users"("Id"),
6262
"TableId" UUID REFERENCES "Tables"("Id")
6363
);
6464

@@ -190,8 +190,8 @@ INSERT INTO "Users" (
190190
);
191191

192192
-- seed Bookings records
193-
INSERT INTO "Bookings" ("Id", "Date", "DurationInMinutes", "UserId", "TableId") VALUES ('fc9663f0-08b1-4c52-afe4-1d446b11017f','2030-01-01 14:30:00+00', 5, 'abc663f0-08b1-4c52-afe4-1d446b11017f', '123e1a20-6801-4a5e-a327-ecc5cb2bd906');
194-
INSERT INTO "Bookings" ("Id", "Date", "DurationInMinutes", "UserId", "TableId") VALUES ('c4c4a1c0-3cb4-445e-ba81-311a6b939b4a','2050-05-07 20:15:00+00', 3, '123663f0-08b1-4c52-afe4-1d446b11017f', '3eb2eb68-a47e-47cd-8a22-06c20197a0b3');
193+
INSERT INTO "Bookings" ("Id", "Date","AmountOfPeople", "DurationInMinutes", "AppUserId", "TableId") VALUES ('fc9663f0-08b1-4c52-afe4-1d446b11017f','2030-01-01 14:30:00+00', 1, 5, 'abc663f0-08b1-4c52-afe4-1d446b11017f', '123e1a20-6801-4a5e-a327-ecc5cb2bd906');
194+
INSERT INTO "Bookings" ("Id", "Date","AmountOfPeople", "DurationInMinutes", "AppUserId", "TableId") VALUES ('c4c4a1c0-3cb4-445e-ba81-311a6b939b4a','2050-05-07 20:15:00+00', 2, 3, '123663f0-08b1-4c52-afe4-1d446b11017f', '3eb2eb68-a47e-47cd-8a22-06c20197a0b3');
195195

196196
-- Seed Users records
197197
INSERT INTO "Users" ("Id", "RefreshToken", "RefreshTokenExpiryTime", "UserName", "NormalizedUserName", "Email", "NormalizedEmail", "EmailConfirmed", "PasswordHash", "SecurityStamp", "ConcurrencyStamp", "PhoneNumber", "PhoneNumberConfirmed", "TwoFactorEnabled", "LockoutEnd", "LockoutEnabled", "AccessFailedCount", "AppRoleId")

0 commit comments

Comments
 (0)