feat: add pre-commit hooks & refactor code to pass linting

This commit is contained in:
Jordan Knott
2020-08-20 18:11:24 -05:00
parent abf9e1328a
commit 9dba566660
49 changed files with 297 additions and 462 deletions

View File

@ -4,4 +4,3 @@ ALTER TABLE task_assigned
FOREIGN KEY (task_id)
REFERENCES task(task_id)
ON DELETE CASCADE;

View File

@ -5,4 +5,3 @@ CREATE TABLE team_member (
UNIQUE(team_id, user_id),
addedDate timestamptz NOT NULL
);

View File

@ -1,4 +1,4 @@
INSERT INTO project_member (user_id, project_id, added_at, role_code)
INSERT INTO project_member (user_id, project_id, added_at, role_code)
SELECT owner as user_id, project_id, NOW() as added_at, 'admin' as role_code
FROM project;
ALTER TABLE project DROP COLUMN owner;

View File

@ -1,4 +1,4 @@
INSERT INTO team_member (user_id, team_id, addeddate, role_code)
INSERT INTO team_member (user_id, team_id, addeddate, role_code)
SELECT owner as user_id, team_id, NOW() as addeddate, 'admin' as role_code
FROM team ON CONFLICT ON CONSTRAINT team_member_team_id_user_id_key DO NOTHING;
ALTER TABLE team DROP COLUMN owner;