-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1121 from cityofaustin/jc-atsd-milestones
Adds new milestones and cleans up moped_proj_milestone table
- Loading branch information
Showing
15 changed files
with
143 additions
and
198 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
13 changes: 13 additions & 0 deletions
13
moped-database/migrations/1694020081030_cleanup_milestone_table/down.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,13 @@ | ||
ALTER TABLE moped_proj_milestones ADD COLUMN completion_percentage integer; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN milestone_status text; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN milestone_privacy boolean; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN milestone_priority integer; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN milestone_date_type text; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN milestone_start date; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN milestone_related_phase_id int; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN is_current_milestone boolean; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN started_by_user_id integer; | ||
ALTER TABLE moped_proj_milestones ADD COLUMN completed_by_user_id integer; | ||
ALTER TABLE moped_proj_milestones RENAME COLUMN description to milestone_description; | ||
ALTER TABLE moped_proj_milestones RENAME COLUMN date_actual to milestone_end; | ||
ALTER TABLE moped_proj_milestones RENAME COLUMN date_estimate to milestone_estimate; |
15 changes: 15 additions & 0 deletions
15
moped-database/migrations/1694020081030_cleanup_milestone_table/up.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,15 @@ | ||
ALTER TABLE moped_proj_milestones | ||
DROP COLUMN completion_percentage, | ||
DROP COLUMN milestone_status, | ||
DROP COLUMN milestone_privacy, | ||
DROP COLUMN milestone_priority, | ||
DROP COLUMN milestone_date_type, | ||
DROP COLUMN milestone_start, | ||
DROP COLUMN milestone_related_phase_id, | ||
DROP COLUMN started_by_user_id, | ||
DROP COLUMN completed_by_user_id, | ||
DROP COLUMN is_current_milestone; | ||
|
||
ALTER TABLE moped_proj_milestones RENAME COLUMN milestone_description TO description; | ||
ALTER TABLE moped_proj_milestones RENAME COLUMN milestone_end TO date_actual; | ||
ALTER TABLE moped_proj_milestones RENAME COLUMN milestone_estimate TO date_estimate; |
4 changes: 4 additions & 0 deletions
4
moped-database/migrations/1694096723403_add_atsd_milestones/down.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,4 @@ | ||
DELETE FROM moped_milestones WHERE milestone_name IN ( | ||
'Public meeting', | ||
'Start project development' | ||
); |
3 changes: 3 additions & 0 deletions
3
moped-database/migrations/1694096723403_add_atsd_milestones/up.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,3 @@ | ||
INSERT INTO moped_milestones (milestone_name) VALUES | ||
('Public meeting'), | ||
('Start project development'); |
4 changes: 4 additions & 0 deletions
4
moped-database/migrations/1694199966743_more_entities/down.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,4 @@ | ||
delete from moped_entity where entity_name in | ||
('City of Austin (COA)', | ||
'University of Texas', | ||
'Austin Transit Partnership (ATP)'); |
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,4 @@ | ||
INSERT INTO moped_entity (entity_name, organization_id, department_id) values | ||
('City of Austin (COA)', 1, 1), | ||
('University of Texas', 4, null), | ||
('Austin Transit Partnership (ATP)', 1, null); |
2 changes: 2 additions & 0 deletions
2
moped-database/migrations/1694709829257_drop-milestone-order/down.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,2 @@ | ||
ALTER TABLE moped_milestones ADd COLUMN milestone_order integer; | ||
INSERT INTO moped_milestones (milestone_id, milestone_name, milestone_order) values (0, 'Unknown', 999); |
2 changes: 2 additions & 0 deletions
2
moped-database/migrations/1694709829257_drop-milestone-order/up.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,2 @@ | ||
ALTER TABLE moped_milestones DROP COLUMN milestone_order; | ||
DELETE FROM moped_milestones where milestone_id = 0; |
Oops, something went wrong.