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

Commit

Permalink
Merge branch 'master' of http://www.github.com/modrinth/labrinth into…
Browse files Browse the repository at this point in the history
… tests
  • Loading branch information
thesuzerain committed Oct 3, 2023
2 parents 54bb6b5 + a1b59d4 commit 5d47008
Show file tree
Hide file tree
Showing 24 changed files with 3,733 additions and 1,047 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 5d47008

Please sign in to comment.