Update Users.sql

This commit is contained in:
Mann Patel
2025-03-11 22:17:03 -06:00
committed by GitHub
parent 76f2fd7b7e
commit 9ca92d31ca

View File

@@ -12,7 +12,8 @@ CREATE TABLE Users (
-- Create a separate table for the multi-valued Role attribute -- Create a separate table for the multi-valued Role attribute
CREATE TABLE UserRole ( CREATE TABLE UserRole (
UserID INT, UserID INT,
Role VARCHAR(20) NOT NULL, -- Contains 'Buyer', 'Seller', or 'Admin' Client BOOLEAN DEFAULT FALSE,
PRIMARY KEY (UserID, Role), Admin BOOLEAN DEFAULT FALSE,
PRIMARY KEY (UserID),
FOREIGN KEY (UserID) REFERENCES Users (ID) ON DELETE CASCADE FOREIGN KEY (UserID) REFERENCES Users (ID) ON DELETE CASCADE
); );