-
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.
feat(CostSurface): More test fixes for the CostSurface to Scenario re…
…lationship
- Loading branch information
1 parent
521526d
commit 8f10f86
Showing
6 changed files
with
79 additions
and
14 deletions.
There are no files selected for viewing
File renamed without changes.
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
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 |
---|---|---|
|
@@ -11,6 +11,14 @@ VALUES | |
('Example Project 1 Org 2', (SELECT id FROM organizations WHERE name = 'Example Org 1'), (SELECT id FROM users WHERE email = '[email protected]'), 'Lorem Ipsum', '[23.719482421875, 21.654052734375, -18.802318121688117, -20.756113874762068]'::jsonb), | ||
('Example Project 2 Org 2', (SELECT id FROM organizations WHERE name = 'Example Org 1'), (SELECT id FROM users WHERE email = '[email protected]'), 'Lorem Ipsum', '[23.719482421875, 21.654052734375, -18.802318121688117, -20.756113874762068]'::jsonb); | ||
|
||
INSERT INTO cost_surfaces | ||
(name, project_id, is_default, min, max) | ||
VALUES | ||
('Example Project 1 Org 1 Default Cost Surface', (SELECT id FROM projects WHERE name = 'Example Project 1 Org 1'), true, 0, 0), | ||
('Example Project 2 Org 1 Default Cost Surface', (SELECT id FROM projects WHERE name = 'Example Project 2 Org 1'), true, 0, 0), | ||
('Example Project 1 Org 2 Default Cost Surface', (SELECT id FROM projects WHERE name = 'Example Project 1 Org 2'), true, 0, 0), | ||
('Example Project 2 Org 2 Default Cost Surface', (SELECT id FROM projects WHERE name = 'Example Project 2 Org 2'), true, 0, 0); | ||
|
||
INSERT INTO users_organizations | ||
(user_id, organization_id, role_id) | ||
VALUES | ||
|
@@ -34,12 +42,12 @@ VALUES | |
((SELECT id FROM users WHERE lower(email) = '[email protected]'), (SELECT id FROM projects WHERE name = 'Example Project 2 Org 2'), 'project_owner'); | ||
|
||
INSERT INTO scenarios | ||
(name, project_id, type, wdpa_threshold, number_of_runs, blm, created_by) | ||
(name, project_id, cost_surface_id, type, wdpa_threshold, number_of_runs, blm, created_by) | ||
VALUES | ||
('Example scenario 1 Project 1 Org 1', (select id from projects where name = 'Example Project 1 Org 1'), 'marxan', 30, 100, 1, (SELECT id FROM users WHERE email = '[email protected]') ), | ||
('Example scenario 2 Project 1 Org 1', (select id from projects where name = 'Example Project 1 Org 1'), 'marxan', 50, 100, 1, (SELECT id FROM users WHERE email = '[email protected]') ), | ||
('Example scenario 1 Project 2 Org 2', (select id from projects where name = 'Example Project 2 Org 2'), 'marxan', 30, 100, 1, (SELECT id FROM users WHERE email = '[email protected]') ), | ||
('Example scenario 2 Project 2 Org 2', (select id from projects where name = 'Example Project 2 Org 2'), 'marxan', 50, 100, 1, (SELECT id FROM users WHERE email = '[email protected]') ); | ||
('Example scenario 1 Project 1 Org 1', (select id from projects where name = 'Example Project 1 Org 1'), (select id from cost_surfaces where name = 'Example Project 1 Org 1 Default Cost Surface'), 'marxan', 30, 100, 1, (SELECT id FROM users WHERE email = '[email protected]') ), | ||
('Example scenario 2 Project 1 Org 1', (select id from projects where name = 'Example Project 1 Org 1'), (select id from cost_surfaces where name = 'Example Project 1 Org 1 Default Cost Surface'), 'marxan', 50, 100, 1, (SELECT id FROM users WHERE email = '[email protected]') ), | ||
('Example scenario 1 Project 2 Org 2', (select id from projects where name = 'Example Project 2 Org 2'), (select id from cost_surfaces where name = 'Example Project 2 Org 2 Default Cost Surface'), 'marxan', 30, 100, 1, (SELECT id FROM users WHERE email = '[email protected]') ), | ||
('Example scenario 2 Project 2 Org 2', (select id from projects where name = 'Example Project 2 Org 2'), (select id from cost_surfaces where name = 'Example Project 2 Org 2 Default Cost Surface'), 'marxan', 50, 100, 1, (SELECT id FROM users WHERE email = '[email protected]') ); | ||
|
||
INSERT INTO platform_admins | ||
(user_id) | ||
|
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
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
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