From 4cd7cbef491f1af48cbdd61d168e79a96409ca37 Mon Sep 17 00:00:00 2001 From: Denis Fedoseev Date: Sat, 22 Jul 2017 16:04:57 +0900 Subject: [PATCH] Add users table. --- deploy/users.sql | 13 +++++++++++++ revert/users.sql | 7 +++++++ sqitch.plan | 1 + verify/users.sql | 9 +++++++++ 4 files changed, 30 insertions(+) create mode 100644 deploy/users.sql create mode 100644 revert/users.sql create mode 100644 verify/users.sql 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;