Skip to content

Commit

Permalink
Merge branch 'release/v0.0.108'
Browse files Browse the repository at this point in the history
* release/v0.0.108:
  feat: add table monthly chapter member n weekly pj charge rate
  • Loading branch information
namnhce committed May 25, 2023
2 parents 8b4908f + cf98210 commit 6cd9c41
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ CREATE TABLE IF NOT EXISTS employee_invitations (
is_team_email_created BOOLEAN NOT NULL DEFAULT false
);

ALTER TABLE employee_invitations
ADD CONSTRAINT employee_invitations_employee_id_fkey FOREIGN KEY (employee_id) REFERENCES employees (id);
ALTER TABLE employee_invitations
ADD CONSTRAINT employee_invitations_invited_by_fkey FOREIGN KEY (invited_by) REFERENCES employees (id);

-- +migrate Down
DROP TABLE IF EXISTS employee_invitations;
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
-- +migrate Up
CREATE TABLE IF NOT EXISTS "monthly_chapter_members" (
id uuid PRIMARY KEY DEFAULT (uuid()),
deleted_at TIMESTAMP(6),
created_at TIMESTAMP(6) DEFAULT (now()),
updated_at TIMESTAMP(6) DEFAULT (now()),

month DATE,
chapter_group_name TEXT NOT NULL,
total_member INT
);

CREATE TABLE IF NOT EXISTS "weekly_project_charge_rates" (
id UUID PRIMARY KEY DEFAULT (UUID()),
deleted_at TIMESTAMP(6),
created_at TIMESTAMP(6) DEFAULT (now()),
updated_at TIMESTAMP(6) DEFAULT (now()),

week DATE,
project_id UUID NOT NULL,
project_name TEXT NOT NULL,
member_id UUID NOT NULL,
member_name TEXT NOT NULL,
charge_rate_amount DECIMAL,
deployment_type deployment_types
);

ALTER TABLE weekly_project_charge_rates
ADD CONSTRAINT weekly_project_charge_rates_member_id_fkey FOREIGN KEY (member_id) REFERENCES employees (id);

ALTER TABLE weekly_project_charge_rates
ADD CONSTRAINT weekly_project_charge_rates_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects (id);

-- +migrate Down
DROP TABLE IF EXISTS monthly_chapter_members;
DROP TABLE IF EXISTS weekly_project_charge_rates;

0 comments on commit 6cd9c41

Please sign in to comment.