Skip to content

Commit

Permalink
re-added migrations folder
Browse files Browse the repository at this point in the history
  • Loading branch information
barrfalk committed Jul 16, 2024
1 parent 7660649 commit d0c67c6
Show file tree
Hide file tree
Showing 50 changed files with 23,499 additions and 0 deletions.
16 changes: 16 additions & 0 deletions migrations/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM flyway/flyway:9.10-alpine

# Create directory for test scripts before we switch to app user
RUN mkdir -p /flyway/sql-test

# Non-root user
RUN adduser -D app
USER app

# Copy migrations
COPY ./migrations /flyway/sql

COPY ./test-only-migrations /flyway/sql-test

# Startup
CMD ["info","migrate","info"]
3 changes: 3 additions & 0 deletions migrations/migrations/R__0.10.0__CE-216.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--
-- Moved to R__Code-Table-Data.sql
--
3 changes: 3 additions & 0 deletions migrations/migrations/R__0.10.1__CE-216.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--
-- Moved to R__Code-Table-Data.sql
--
3 changes: 3 additions & 0 deletions migrations/migrations/R__0.10.2__CE-216.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--
-- Moved to R__Code-Table-Data.sql
--
23 changes: 23 additions & 0 deletions migrations/migrations/R__0.10.3__CE-216.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--
-- update complaint owner to EPO agency where allegation violation_code is WASTE or PESTICDE
--

--
-- ATTENTION IF THIS FILE IS EVER TOUCHED ON A RELEASE FOR ANY REASON!!!!!!!!!!!!
--
-- If this file is touched causing the checksum to change flyway will execute it in the
-- various environment, INCLUDING PRODUCTION. This may not be desired, especially the first two
-- statements. Think twice before touching this file. In retrospect this should have been a versioned script.
--

UPDATE complaint SET owned_by_agency_code = 'EPO'
FROM allegation_complaint
WHERE complaint.complaint_identifier = allegation_complaint.complaint_identifier AND allegation_complaint.violation_code = 'WASTE';

UPDATE complaint SET owned_by_agency_code = 'EPO'
FROM allegation_complaint
WHERE complaint.complaint_identifier = allegation_complaint.complaint_identifier AND allegation_complaint.violation_code = 'PESTICDE';

UPDATE complaint SET owned_by_agency_code = 'COS'
FROM allegation_complaint
WHERE complaint.owned_by_agency_code IS NULL
Loading

0 comments on commit d0c67c6

Please sign in to comment.