About and database table to convert for the orm

This commit is contained in:
gom-by
2025-01-14 13:49:04 +01:00
parent 0c0e5f80b9
commit 24e3272ab5
8 changed files with 94 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
CREATE TABLE events_to_users (
event_id UUID REFERENCES events(event_id) ON DELETE CASCADE, -- Foreign key with cascading delete for referential integrity
user_id UUID REFERENCES users(user_id) ON DELETE CASCADE, -- Foreign key with cascading delete
PRIMARY KEY (event_id, user_id) -- Ensure uniqueness of event-user pairs
);