Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic Projects Schema #12

Merged
merged 4 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libs/supabase/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@
"command": "supabase stop",
"cwd": "libs/supabase"
}
},
"reset": {
"executor": "nx:run-commands",
"options": {
"command": "supabase db reset",
"cwd": "libs/supabase"
}
}
},
"create-local-snapshot": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
create table if not exists public.teams (
id serial not null,
name text not null,
org_id uuid not null,
avatar text,
unique (org_id, name),
constraint teams_org_fkey foreign key (org_id) references public.organizations (id) on delete cascade,
constraint teams_pkey primary key (id)
) tablespace pg_default;

create table if not exists public.team_members (
member_id uuid not null,
org_id uuid not null,
team_id serial not null,
constraint member_id_fkey foreign key (member_id) references public.profiles (id) on delete cascade,
constraint org_id_fkey foreign key (org_id) references public.organizations (id) on delete cascade,
constraint team_id_fkey foreign key (team_id) references public.teams (id) on delete cascade,
constraint team_members_pkey primary key (member_id, org_id, team_id)
) tablespace pg_default;

create table if not exists public.projects (
id serial not null,
org_id uuid not null,
name text not null,
description text not null,
avatar text,
constraint projects_pkey primary key (id),
constraint org_id_fkey foreign key (org_id) references public.organizations (id) on delete cascade,
unique (org_id, name)
) tablespace pg_default;

create table if not exists public.project_teams (
project_id serial not null,
team_id serial not null,
constraint project_id_fkey foreign key (project_id) references public.projects (id) on delete cascade,
constraint team_id_fkey foreign key (team_id) references public.teams (id) on delete cascade,
constraint project_teams_pkey primary key (team_id, project_id)
) tablespace pg_default;

create table if not exists public.kanban_projects (
constraint kanban_projects_fkey foreign key (id) references public.projects (id) on delete cascade
) inherits (public.projects) tablespace pg_default;

create table if not exists public.agile_projects (
scrum_master uuid,
constraint scrum_master_fkey foreign key (scrum_master) references public.profiles (id),
constraint agile_projects_fkey foreign key (id) references public.projects (id) on delete cascade
) inherits (public.projects) tablespace pg_default;

create table if not exists public.waterfall_projects (
phase_count int,
constraint waterfall_projects_fkey foreign key (id) references public.projects (id) on delete cascade
) inherits (public.projects) tablespace pg_default;

Empty file added libs/ui/src/server.ts
Empty file.
131 changes: 13 additions & 118 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -1,132 +1,27 @@
{
"migrations": [
{
"cli": "nx",
"version": "17.0.0-beta.1",
"description": "Updates the default cache directory to .nx/cache",
"implementation": "./src/migrations/update-17-0-0/move-cache-directory",
"package": "nx",
"name": "17.0.0-move-cache-directory"
},
{
"cli": "nx",
"version": "17.0.0-beta.3",
"description": "Use minimal config for tasksRunnerOptions",
"implementation": "./src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options",
"version": "18.1.0-beta.3",
"description": "Moves affected.defaultBase to defaultBase in `nx.json`",
"implementation": "./src/migrations/update-17-2-0/move-default-base",
"package": "nx",
"name": "17.0.0-use-minimal-config-for-tasks-runner-options"
},
{
"version": "17.0.0-rc.1",
"description": "Migration for v17.0.0-rc.1",
"implementation": "./src/migrations/update-17-0-0/rm-default-collection-npm-scope",
"package": "nx",
"name": "rm-default-collection-npm-scope"
"name": "move-default-base-to-nx-json-root"
},
{
"cli": "nx",
"version": "17.3.0-beta.6",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-17-3-0/update-nxw",
"package": "nx",
"name": "17.3.0-update-nx-wrapper"
},
{
"cli": "nx",
"version": "18.0.0-beta.2",
"description": "Updates .env to disabled adding plugins when generating projects in an existing Nx workspace",
"implementation": "./src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces",
"x-repair-skip": true,
"package": "nx",
"name": "18.0.0-disable-adding-plugins-for-existing-workspaces"
},
{
"version": "17.1.0-beta.2",
"description": "Move target defaults",
"implementation": "./src/migrations/update-17-1-0/move-target-defaults",
"package": "@nx/vite",
"name": "move-target-defaults"
},
{
"version": "17.2.0-beta.10",
"description": "Update vite config.",
"implementation": "./src/migrations/update-17-2-0/update-vite-config",
"package": "@nx/vite",
"name": "update-vite-config"
},
{
"version": "17.3.0-beta.0",
"description": "Move the vitest coverage thresholds in their own object if exists and add reporters.",
"implementation": "./src/migrations/update-17-3-0/vitest-coverage-and-reporters",
"package": "@nx/vite",
"name": "vitest-coverage-and-reporters"
},
{
"version": "17.1.0-beta.2",
"description": "Move jest executor options to nx.json targetDefaults",
"implementation": "./src/migrations/update-17-1-0/move-options-to-target-defaults",
"package": "@nx/jest",
"name": "move-options-to-target-defaults"
"version": "18.1.0-beta.3",
"description": "Update to Cypress ^13.6.6 if the workspace is using Cypress v13 to ensure workspaces don't use v13.6.5 which has an issue when verifying Cypress.",
"implementation": "./src/migrations/update-18-1-0/update-cypress-version-13-6-6",
"package": "@nx/cypress",
"name": "update-cypress-version-13-6-6"
},
{
"cli": "nx",
"version": "18.0.0-beta.0",
"description": "Add NX_MF_DEV_SERVER_STATIC_REMOTES to inputs for task hashing when '@nx/webpack:webpack' is used for Module Federation.",
"factory": "./src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults",
"version": "18.1.1-beta.0",
"description": "Ensure targetDefaults inputs for task hashing when '@nx/webpack:webpack' is used are correct for Module Federation.",
"factory": "./src/migrations/update-18-1-1/fix-target-defaults-inputs",
"package": "@nx/react",
"name": "add-module-federation-env-var-to-target-defaults"
},
{
"cli": "nx",
"version": "17.2.1-beta.0",
"description": "Add webpack.config.js file when webpackConfig is not defined",
"implementation": "./src/migrations/update-17-2-1/webpack-config-setup",
"package": "@nx/webpack",
"name": "update-17-2-1-webpack-config-setup"
},
{
"cli": "nx",
"version": "17.2.7",
"description": "Remove patched eslint rule for @next/next/no-html-link-for-pages",
"implementation": "./src/migrations/update-17-2-7/remove-eslint-rules-patch",
"package": "@nx/next",
"name": "update-17-2-7"
},
{
"cli": "nx",
"version": "17.2.6-beta.1",
"description": "Rename workspace rules from @nx/workspace/name to @nx/workspace-name",
"implementation": "./src/migrations/update-17-2-6-rename-workspace-rules/rename-workspace-rules",
"package": "@nx/eslint-plugin",
"name": "update-17-2-6-rename-workspace-rules"
},
{
"version": "17.0.0-beta.7",
"description": "update-17-0-0-rename-to-eslint",
"implementation": "./src/migrations/update-17-0-0-rename-to-eslint/update-17-0-0-rename-to-eslint",
"package": "@nx/linter",
"name": "update-17-0-0-rename-to-eslint"
},
{
"version": "17.1.0-beta.1",
"description": "Updates for @typescript-utils/utils v6.9.1+",
"implementation": "./src/migrations/update-17-1-0/update-typescript-eslint",
"package": "@nx/linter",
"name": "update-typescript-eslint"
},
{
"version": "17.2.0-beta.0",
"description": "Simplify eslintFilePatterns",
"implementation": "./src/migrations/update-17-2-0/simplify-eslint-patterns",
"package": "@nx/linter",
"name": "simplify-eslint-patterns"
},
{
"version": "17.2.9",
"description": "Move executor options to target defaults",
"implementation": "./src/migrations/update-17-2-9/move-options-to-target-defaults",
"package": "@nx/linter",
"name": "move-options-to-target-defaults"
"name": "fix-target-defaults-for-webpack"
}
]
}
Loading
Loading