This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into trolley-wip
- Loading branch information
Showing
97 changed files
with
9,602 additions
and
7,865 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
CREATE TABLE collections ( | ||
id bigint PRIMARY KEY, | ||
title varchar(255) NOT NULL, | ||
description varchar(2048) NOT NULL, | ||
user_id bigint REFERENCES users NOT NULL, | ||
created timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
updated timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
||
status varchar(64) NOT NULL DEFAULT 'listed', | ||
|
||
icon_url varchar(2048) NULL, | ||
color integer NULL | ||
); | ||
|
||
CREATE TABLE collections_mods ( | ||
collection_id bigint REFERENCES collections NOT NULL, | ||
mod_id bigint REFERENCES mods NOT NULL, | ||
PRIMARY KEY (collection_id, mod_id) | ||
); | ||
|
||
CREATE TABLE uploaded_images ( | ||
id bigint PRIMARY KEY, | ||
url varchar(2048) NOT NULL, | ||
size integer NOT NULL, | ||
created timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
owner_id bigint REFERENCES users NOT NULL, | ||
|
||
-- Type of contextual association | ||
context varchar(64) NOT NULL, -- project, version, thread_message, report, etc. | ||
|
||
-- Only one of these should be set (based on 'context') | ||
mod_id bigint NULL REFERENCES mods, | ||
version_id bigint NULL REFERENCES versions, | ||
thread_message_id bigint NULL REFERENCES threads_messages, | ||
report_id bigint NULL REFERENCES reports | ||
|
||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CREATE TABLE organizations ( | ||
id bigint PRIMARY KEY, | ||
title varchar(255) NOT NULL, -- also slug | ||
description text NOT NULL, | ||
created_at timestamp NOT NULL DEFAULT now(), | ||
updated_at timestamp NOT NULL DEFAULT now(), | ||
team_id bigint NOT NULL REFERENCES teams(id) ON UPDATE CASCADE, | ||
|
||
icon_url varchar(255) NULL, | ||
color integer NULL | ||
); | ||
|
||
ALTER TABLE mods ADD COLUMN organization_id bigint NULL REFERENCES organizations(id) ON DELETE SET NULL; | ||
|
||
-- Organization permissions only apply to teams that are associated to an organization | ||
-- If they do, 'permissions' is considered the fallback permissions for projects in the organization | ||
ALTER TABLE team_members ADD COLUMN organization_permissions bigint NULL; |
Oops, something went wrong.