-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add default odk credentials to organisations
- Loading branch information
1 parent
c74855e
commit 79347d4
Showing
6 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- ## Migration to: | ||
-- * Add odk central credentials (str) to organisations table. | ||
|
||
-- Start a transaction | ||
BEGIN; | ||
|
||
ALTER TABLE IF EXISTS public.organisations | ||
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; | ||
-- Commit the transaction | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ ALTER TABLE IF EXISTS public.users | |
DROP COLUMN IF EXISTS profile_img; | ||
|
||
-- Commit the transaction | ||
COMMIT; | ||
COMMIT; |
11 changes: 11 additions & 0 deletions
11
src/backend/migrations/revert/004-organisation-odk-creds.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- Start a transaction | ||
BEGIN; | ||
|
||
-- Remove the odk central credentials columns from the public.organisations table | ||
ALTER TABLE IF EXISTS public.organisations | ||
DROP COLUMN IF EXISTS odk_central_url CASCADE, | ||
DROP COLUMN IF EXISTS odk_central_user CASCADE, | ||
DROP COLUMN IF EXISTS odk_central_password CASCADE; | ||
|
||
-- Commit the transaction | ||
COMMIT; |