This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from nnutter/no_host_port_on_template
remove host and port from templates
- Loading branch information
Showing
17 changed files
with
74 additions
and
34 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
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,11 @@ | ||
-- Deploy database_template-drop_host_and_port | ||
-- requires: database_template-table | ||
|
||
BEGIN; | ||
|
||
-- CASCADE for the unnamed unique constraint on host, port, and name | ||
ALTER TABLE database_template DROP COLUMN host CASCADE; | ||
ALTER TABLE database_template DROP COLUMN port; | ||
ALTER TABLE database_template ADD CONSTRAINT database_template_unique_name UNIQUE (name); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Deploy seed-template1 | ||
-- requires: database_template-drop_host_and_port | ||
|
||
BEGIN; | ||
|
||
INSERT INTO database_template (name, owner, note) | ||
VALUES ('template1', 'postgres', 'built-in template1'); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Revert database_template-drop_host_and_port | ||
|
||
BEGIN; | ||
|
||
ALTER TABLE database_template ADD COLUMN host VARCHAR NOT NULL; | ||
ALTER TABLE database_template ADD COLUMN port VARCHAR NOT NULL; | ||
ALTER TABLE database_template ADD CONSTRAINT database_template_unique_host_port_name UNIQUE (host, port, name); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Revert seed-template1 | ||
|
||
BEGIN; | ||
|
||
DELETE FROM database_template WHERE name = 'template1'; | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
%syntax-version=1.0.0-b2 | ||
%syntax-version=1.0.0 | ||
%project=test_db_server | ||
|
||
empty_db 2014-09-17T21:31:58Z Anthony Brummett <[email protected]># Initial, empty database | ||
|
@@ -7,3 +7,5 @@ live_database_table 2014-09-17T21:51:14Z Anthony Brummett <[email protected] | |
database_template-table 2014-10-10T20:16:22Z Anthony Brummett <[email protected]># Add table for new-style template databases | ||
switch-template_id-constraint [database_template-table live_database_table] 2014-10-13T19:40:57Z Anthony Brummett <[email protected]># Change the live_database.template_id FK to point to the template_database table | ||
remove-db_template-table [db_template_table] 2014-10-17T19:47:37Z Anthony Brummett <[email protected]># Remove entity table for old-style templates | ||
database_template-drop_host_and_port [database_template-table] 2014-11-10T20:34:39Z Nathaniel Nutter <[email protected]># drop host and port columns | ||
seed-template1 [database_template-drop_host_and_port] 2014-11-10T20:57:36Z Nathaniel Nutter <[email protected]># seed the template database with an entry for template1 |
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,7 @@ | ||
-- Verify database_template-drop_host_and_port | ||
|
||
BEGIN; | ||
|
||
INSERT INTO database_template (name, owner) VALUES ('xxxx', 'xxxx'); | ||
|
||
ROLLBACK; |
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,7 @@ | ||
-- Verify seed-template1 | ||
|
||
BEGIN; | ||
|
||
SELECT 1/COUNT(*) FROM database_template WHERE name = 'template1'; | ||
|
||
ROLLBACK; |
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
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