-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/v0.0.108: feat: add table monthly chapter member n weekly pj charge rate
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...s/schemas/20230525000301-add_table_monthly_chapter_members_weekly_project_charge_rate.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |