Skip to content

Commit

Permalink
Event status update existing (#223)
Browse files Browse the repository at this point in the history
* update existing events with correct status

* changelog master

* r14

* simplify query

* rm from changelog master

* [ci skip] auto patch increment
skip-checks: true

Co-authored-by: ras-rm-bot <[email protected]>
  • Loading branch information
jdfox and ras-rm-bot authored Dec 9, 2020
1 parent 912dc7c commit 9fe46d4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/database/changelog-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ databaseChangeLog:

- include:
file: database/changes/release-13/changelog.yml

# When adding new groups of migrations to this file the numbers are arbitrary, please follow the following format for
# all migrations after this point, using the the format "release-$NEXT_NUMBER". Incrementing $NEXT_NUMBER each
# time.
Expand Down
11 changes: 11 additions & 0 deletions src/main/resources/database/changes/release-14/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
databaseChangeLog:

- changeSet:
id: 14.1
author: Jon Fox
changes:
- sqlFile:
comment: update existing events with correct status
path: update_existing_events_status.sql
relativeToChangelogFile: true
splitStatements: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
UPDATE collectionexercise.event AS e
SET status = 'SCHEDULED'
WHERE e.status = 'NOT_SET'
AND e.timestamp >= now()
AND e.timestamp IS NOT NULL;

UPDATE collectionexercise.event AS e
SET status = 'PROCESSED'
WHERE e.status = 'NOT_SET'
AND e.timestamp < now()
AND e.timestamp IS NOT NULL;

0 comments on commit 9fe46d4

Please sign in to comment.