-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
67 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Deploy todo_app:todo_appschema to pg | ||
|
||
BEGIN; | ||
|
||
CREATE SCHEMA todo_app; | ||
|
||
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,16 @@ | ||
-- Deploy todo_app:todos to pg | ||
-- requires: todo_app | ||
|
||
BEGIN; | ||
|
||
SET client_min_messages = 'warning'; | ||
|
||
CREATE TABLE todo_app.todos ( | ||
id integer primary key generated always as identity, | ||
task TEXT NOT NULL, | ||
completed BOOLEAN NOT NULL, | ||
date_created TIMESTAMPTZ NOT NULL DEFAULT NOW(), | ||
date_updated TIMESTAMPTZ NOT NULL | ||
); | ||
|
||
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 todo_app:todo_appschema from pg | ||
|
||
BEGIN; | ||
|
||
DROP SCHEMA todo_app; | ||
|
||
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 todo_app:todos from pg | ||
|
||
BEGIN; | ||
|
||
DROP TABLE todo_app.todos; | ||
|
||
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,8 @@ | ||
[core] | ||
engine = pg | ||
# plan_file = sqitch.plan | ||
# top_dir = . | ||
[engine "pg"] | ||
target = todo_app | ||
[target "todo_app"] | ||
uri = db:pg://localhost/todo_app |
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,6 @@ | ||
%syntax-version=1.0.0 | ||
%project=todo_app | ||
%uri=https://github.com/button-inc/button-onboarding | ||
|
||
todo_appschema 2022-02-23T18:45:03Z Brianna Cerkiewicz <briannacerkiewicz@pop-os> # Add schema for all todo app objects. | ||
data [todo_appschema] 2022-02-23T19:17:10Z Brianna Cerkiewicz <briannacerkiewicz@pop-os> # Creates table to hold app data. |
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 todo_app:todo_appschema on pg | ||
|
||
BEGIN; | ||
|
||
-- XXX Add verifications here. | ||
|
||
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,9 @@ | ||
-- Verify todo_app:todos on pg | ||
|
||
BEGIN; | ||
|
||
SELECT task, completed, date_created, date_updated | ||
FROM todo_app.todos | ||
WHERE FALSE; | ||
|
||
ROLLBACK; |