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 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
);