* delete broadcast views when user is deleted (for tests)

This commit is contained in:
Seth Call 2015-06-15 20:54:40 -05:00
parent 9ff44a21ac
commit 5af9d759f2
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ CREATE TABLE broadcast_notifications (
CREATE TABLE broadcast_notification_views (
id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id varchar(64) NOT NULL REFERENCES users(id),
user_id varchar(64) NOT NULL REFERENCES users(id) ON DELETE CASCADE,
broadcast_notification_id varchar(64) NOT NULL REFERENCES broadcast_notifications(id) ON DELETE CASCADE,
view_count INTEGER DEFAULT 0,
active_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,