diff --git a/manifest b/manifest index 833ff3cd8..b2fa30a36 100644 --- a/manifest +++ b/manifest @@ -54,4 +54,8 @@ collapse_user_and_admin.sql default_gender_to_null.sql subscribe_email.sql notifications.sql +notification_type_col_rename.sql +notifications_add_friend_req_id.sql +artifact_metadata.sql +mixes.sql perf_data.sql diff --git a/up/artifact_metadata.sql b/up/artifact_metadata.sql new file mode 100644 index 000000000..77905a8d3 --- /dev/null +++ b/up/artifact_metadata.sql @@ -0,0 +1,3 @@ +-- add a size field and make md5 required +ALTER TABLE artifact_updates ADD COLUMN size INTEGER NOT NULL; +ALTER TABLE artifact_updates ALTER COLUMN sha1 SET NOT NULL; diff --git a/up/mixes.sql b/up/mixes.sql new file mode 100644 index 000000000..376dc2d30 --- /dev/null +++ b/up/mixes.sql @@ -0,0 +1,18 @@ +-- mixes +CREATE TABLE mixes( + id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(), + recording_id VARCHAR(64) NOT NULL REFERENCES recordings(id) ON DELETE CASCADE, + owner_id VARCHAR(64) NOT NULL REFERENCES users(id) ON DELETE CASCADE, + description VARCHAR(1024) NOT NULL, + spec TEXT NOT NULL, + url VARCHAR(512) DEFAULT NULL, + mix_server VARCHAR(64) DEFAULT NULL, + started_at TIMESTAMP DEFAULT NULL, + completed_at TIMESTAMP DEFAULT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +CREATE INDEX index_started_at ON mixes USING btree (started_at); +CREATE INDEX index_completed_at ON mixes USING btree (completed_at); + diff --git a/up/notification_type_col_rename.sql b/up/notification_type_col_rename.sql new file mode 100644 index 000000000..5befa0477 --- /dev/null +++ b/up/notification_type_col_rename.sql @@ -0,0 +1 @@ +alter table notifications rename column type to description; \ No newline at end of file diff --git a/up/notifications_add_friend_req_id.sql b/up/notifications_add_friend_req_id.sql new file mode 100644 index 000000000..c1e1f53f5 --- /dev/null +++ b/up/notifications_add_friend_req_id.sql @@ -0,0 +1 @@ +alter table notifications add COLUMN friend_request_id varchar(64) REFERENCES friend_requests(id); \ No newline at end of file