Skip to content

Commit

Permalink
add liquibase migration to make registered_at non null and update nul…
Browse files Browse the repository at this point in the history
…l values
  • Loading branch information
Shakespeared committed Mar 25, 2024
1 parent 22ef2a0 commit d04cf6a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ You only have to do this once.
```shell
./render_config.sh
```
#### Get on the Broad VPN
You need to be on the non-split VPN to perform the next steps

#### Source Environment Variables
```shell
Expand All @@ -209,6 +211,8 @@ sh docker/run-proxy.sh start
```

#### Run Sam!
You can either use sbt, or if you are using intelliJ set up a run configuration to debug as described below instead

```shell
sbt run
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@
<include file="changesets/20230929_add_tos_audit_table.xml" relativeToChangelogFile="true"/>
<include file="changesets/20231011_add_tos_audit_table_created_at_pk.xml" relativeToChangelogFile="true"/>
<include file="changesets/20231019_sam_user_attributes_table.xml" relativeToChangelogFile="true"/>
<include file="changesets/20240325_default_registered_at_to_1970.xml" relativeToChangelogFile="true"/>

</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?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="kfeldman" id="default_registered_at_to_1970">
<sql>
update sam_user set registered_at = '1970-01-01 00:00:00-00'::timestamptz where registered_at is null
</sql>
</changeSet>
<changeSet logicalFilePath="dummy" author="kfeldman" id="make_registered_at_non_nullable">
<dropNotNullConstraint tableName="sam_user" columnName="registered_at"/>
</changeSet>
</databaseChangeLog>

0 comments on commit d04cf6a

Please sign in to comment.