Skip to content

Commit

Permalink
build: merge migrations to organisations table
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jan 22, 2024
1 parent 2ec8980 commit 12acd85
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
9 changes: 0 additions & 9 deletions src/backend/migrations/004-add-approved-in-organisation.sql

This file was deleted.

2 changes: 2 additions & 0 deletions src/backend/migrations/004-organisation-odk-creds.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
-- ## Migration to:
-- * Add odk central credentials (str) to organisations table.
-- * Add the approved (bool) field to organisations table.

-- Start a transaction
BEGIN;

ALTER TABLE IF EXISTS public.organisations
ADD COLUMN IF NOT EXISTS approved BOOLEAN DEFAULT false,
ADD COLUMN IF NOT EXISTS odk_central_url VARCHAR,
ADD COLUMN IF NOT EXISTS odk_central_user VARCHAR,
ADD COLUMN IF NOT EXISTS odk_central_password VARCHAR;
Expand Down
4 changes: 3 additions & 1 deletion src/backend/migrations/revert/004-organisation-odk-creds.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
-- Start a transaction
BEGIN;

-- Remove the odk central credentials columns from the public.organisations table
-- Remove the odk central credentials columns and approved column
--- from the public.organisations table
ALTER TABLE IF EXISTS public.organisations
DROP COLUMN IF EXISTS approved,
DROP COLUMN IF EXISTS odk_central_url CASCADE,
DROP COLUMN IF EXISTS odk_central_user CASCADE,
DROP COLUMN IF EXISTS odk_central_password CASCADE;
Expand Down

This file was deleted.

0 comments on commit 12acd85

Please sign in to comment.