Skip to content

Commit

Permalink
Update environment and transportation ministry names
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle1morel committed Nov 21, 2024
1 parent 6fbc131 commit abd7df3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/src/db/migrations/20241120000000_012-permit-name-updates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export async function up(knex: Knex): Promise<void> {
end`)
)

.then(() =>
knex.schema.raw(`update public.permit_type
set agency = case
when agency = 'Environment and Climate Change Strategy' then 'Environment and Parks'
when agency = 'Transportation and Infrastructure' then 'Transportation and Transit'
else agency
end`)
)

.then(() => {
return knex('permit_type').insert([
{
Expand Down Expand Up @@ -88,6 +97,15 @@ export async function down(knex: Knex): Promise<void> {
WHERE name = 'Fish & Wildlife Fish Salvage Permit'`)
)

.then(() =>
knex.schema.raw(`update public.permit_type
set agency = case
when agency = 'Environment and Parks' then 'Environment and Climate Change Strategy'
when agency = 'Transportation and Transit' then 'Transportation and Infrastructure'
else agency
end`)
)

.then(() =>
knex.schema.raw(`update public.permit_type
set name = case
Expand Down

0 comments on commit abd7df3

Please sign in to comment.