-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CORE-133: add status column for billing account change synchronizer (#…
- Loading branch information
Showing
6 changed files
with
340 additions
and
11 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
26 changes: 26 additions & 0 deletions
26
...roadinstitute/dsde/rawls/liquibase/changesets/20241121_billing_account_changes_status.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,26 @@ | ||
<?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 https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.30.xsd"> | ||
<changeSet id="add_billing_account_changes_status" author="davidan" logicalFilePath="dummy"> | ||
<!-- add BILLING_ACCOUNT_CHANGES.STATUS column, defaulting to 'outstanding' --> | ||
<addColumn tableName="BILLING_ACCOUNT_CHANGES"> | ||
<column name="STATUS" | ||
type="ENUM('Ignored','Outstanding','Synchronized')" | ||
defaultValue="Outstanding" | ||
afterColumn="GOOGLE_SYNC_TIME"> | ||
<constraints nullable="false"/> | ||
</column> | ||
</addColumn> | ||
<!-- add an index on the BILLING_ACCOUNT_CHANGES.STATUS column --> | ||
<createIndex tableName="BILLING_ACCOUNT_CHANGES" indexName="BILLING_ACCOUNT_CHANGES_STATUS" unique="false"> | ||
<column name="STATUS" | ||
remarks="Has this change been synchronized with GCP?"/> | ||
</createIndex> | ||
<!-- set STATUS='synchronized' for all previously-synchronized rows --> | ||
<sql>update BILLING_ACCOUNT_CHANGES | ||
set STATUS='Synchronized' | ||
where GOOGLE_SYNC_TIME is not null;</sql> | ||
</changeSet> | ||
</databaseChangeLog> |
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
Oops, something went wrong.