Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Organizations (#712)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
thesuzerain and Geometrically authored Oct 2, 2023
1 parent 58a6105 commit a1b59d4
Show file tree
Hide file tree
Showing 24 changed files with 3,686 additions and 1,007 deletions.
17 changes: 17 additions & 0 deletions migrations/20230913024611_organizations.sql
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;
Loading

0 comments on commit a1b59d4

Please sign in to comment.