diff --git a/manifest b/manifest index 4343951f5..f83c244c0 100644 --- a/manifest +++ b/manifest @@ -23,4 +23,5 @@ as_musician.sql bootstrap_users_v3.sql update_user_band_fields.sql add_recording_creator_id.sql -make_location_nullable.sql \ No newline at end of file +make_location_nullable.sql +band_invitations.sql \ No newline at end of file diff --git a/up/band_invitations.sql b/up/band_invitations.sql new file mode 100644 index 000000000..ff135bcaf --- /dev/null +++ b/up/band_invitations.sql @@ -0,0 +1,9 @@ +CREATE TABLE band_invitations ( + id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(), + user_id VARCHAR(64) REFERENCES users(id) ON DELETE CASCADE, + band_id VARCHAR(64) REFERENCES bands(id) ON DELETE CASCADE, + accepted BOOLEAN, + creator_id VARCHAR(64) REFERENCES users(id) ON DELETE CASCADE, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); \ No newline at end of file