diff --git a/deploy/users.sql b/deploy/users.sql new file mode 100644 index 0000000..f713308 --- /dev/null +++ b/deploy/users.sql @@ -0,0 +1,13 @@ +-- Deploy fotostore:users to sqlite + +BEGIN; + +CREATE TABLE users ( + nickname TEXT PRIMARY KEY, + password TEXT NOT NULL, + fullname TEXT NOT NULL, + twitter TEXT NOT NULL, + timestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +COMMIT; diff --git a/revert/users.sql b/revert/users.sql new file mode 100644 index 0000000..cb3357a --- /dev/null +++ b/revert/users.sql @@ -0,0 +1,7 @@ +-- Revert fotostore:users from sqlite + +BEGIN; + +DROP TABLE users; + +COMMIT; diff --git a/sqitch.plan b/sqitch.plan index f44c4cc..a1fe3fb 100644 --- a/sqitch.plan +++ b/sqitch.plan @@ -2,3 +2,4 @@ %project=fotostore %uri=https://rsscp.ru/ +users 2017-07-22T06:53:03Z Denis Fedoseev # Creates table to track our users. diff --git a/verify/users.sql b/verify/users.sql new file mode 100644 index 0000000..f5d4aa8 --- /dev/null +++ b/verify/users.sql @@ -0,0 +1,9 @@ +-- Verify fotostore:users on sqlite + +BEGIN; + +SELECT nickname, password, fullname, twitter + FROM users + WHERE 0; + +ROLLBACK;