-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CA-1040] migrate to add google project resource for v1 billing proje…
…cts (#475)
- Loading branch information
Showing
2 changed files
with
28 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
27 changes: 27 additions & 0 deletions
27
...e/sam/liquibase/changesets/20201103_add_google_project_child_for_each_billing_project.xml
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,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<databaseChangeLog logicalFilePath="dummy" | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"> | ||
|
||
<changeSet logicalFilePath="dummy" author="ajang" id="add_google_project_child_for_each_billing_project"> | ||
<sql stripComments="true"> | ||
INSERT INTO sam_resource | ||
(name, | ||
resource_type_id, | ||
resource_parent_id) | ||
SELECT sr.name, | ||
(SELECT id | ||
FROM sam_resource_type | ||
WHERE name = 'google-project'), | ||
sr.id | ||
FROM sam_resource sr | ||
JOIN sam_resource_type srt | ||
ON sr.resource_type_id = srt.id | ||
WHERE srt.name = 'billing-project' | ||
on conflict do nothing; | ||
</sql> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |