Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RW-13455][risk=no] Backfill user initial credits expiration records #9009

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet author="eric" id="db.changelog-255-backfill-user-initial-credits-expiration">
<sql>
INSERT INTO user_initial_credits_expiration (user_id, credit_start_time, expiration_time)
SELECT uam.user_id, '2025-02-18 00:00:00', '2025-06-18 00:00:00'
FROM user_access_module AS uam
INNER JOIN access_module AS am
ON uam.access_module_id = am.access_module_id
WHERE am.name ="DATA_USER_CODE_OF_CONDUCT"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this use DUCC completion instead of RT access?

AND (completion_time IS NOT NULL OR bypass_time IS NOT NULL)
AND uam.user_id NOT IN (SELECT user_id FROM user_initial_credits_expiration);
</sql>
</changeSet>
</databaseChangeLog>
1 change: 1 addition & 0 deletions api/db/changelog/db.changelog-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@
<include file="changelog/db.changelog-252-add-vwb-tier-group-access-tier-table.xml"/>
<include file="changelog/db.changelog-253-rm-needs-v8-genomic-extraction-workflow.xml"/>
<include file="changelog/db.changelog-254-remove-initial-credits-expired.xml"/>
<include file="changelog/db.changelog-255-backfill-user-initial-credits-expiration.xml"/>
<!--
Note: to update the DB locally, do the following:
- Migrate schema changes: `./project.rb run-local-all-migrations`
Expand Down