From 9ca92d31caddcb80b5e49fdf9dfc5efef0ca05b4 Mon Sep 17 00:00:00 2001 From: Mann Patel <130435633+MannPatel0@users.noreply.github.com> Date: Tue, 11 Mar 2025 22:17:03 -0600 Subject: [PATCH] Update Users.sql --- SQL_code/Users.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SQL_code/Users.sql b/SQL_code/Users.sql index e2b844e..9e98b13 100644 --- a/SQL_code/Users.sql +++ b/SQL_code/Users.sql @@ -12,7 +12,8 @@ CREATE TABLE Users ( -- Create a separate table for the multi-valued Role attribute CREATE TABLE UserRole ( UserID INT, - Role VARCHAR(20) NOT NULL, -- Contains 'Buyer', 'Seller', or 'Admin' - PRIMARY KEY (UserID, Role), + Client BOOLEAN DEFAULT FALSE, + Admin BOOLEAN DEFAULT FALSE, + PRIMARY KEY (UserID), FOREIGN KEY (UserID) REFERENCES Users (ID) ON DELETE CASCADE );