You've already forked AstralRinth
forked from didirus/AstralRinth
Organizations (#712)
* untested, unformatted, un-refactored * minor simplification * simplification fix * refactoring, changes * some fixes * fixes, refactoring * missed cache * revs * revs - more! * removed donation links; added all org members to route * renamed slug to title --------- Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
17
migrations/20230913024611_organizations.sql
Normal file
17
migrations/20230913024611_organizations.sql
Normal file
@@ -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;
|
||||
Reference in New Issue
Block a user