diff --git a/sql/deploy/users.sql b/sql/deploy/users.sql index f713308..a296ced 100644 --- a/sql/deploy/users.sql +++ b/sql/deploy/users.sql @@ -3,11 +3,12 @@ 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 + nickname TEXT, + password TEXT NOT NULL, + fullname TEXT NOT NULL, + timestamp DATETIME NOT NULL + DEFAULT CURRENT_TIMESTAMP, + user_id INTEGER PRIMARY KEY AUTOINCREMENT ); COMMIT; diff --git a/sql/sqitch.plan b/sql/sqitch.plan index 686b260..a490023 100644 --- a/sql/sqitch.plan +++ b/sql/sqitch.plan @@ -4,3 +4,6 @@ users 2017-07-22T06:53:03Z Denis Fedoseev # Creates table to track our users. images 2017-07-22T07:17:52Z Denis Fedoseev # Creates table to track users images. +albums 2017-07-22T08:50:11Z Denis Fedoseev # Albums database init +user_images [users images] 2017-07-22T09:16:20Z Denis Fedoseev # +user_images table +album_images [images albums] 2017-07-22T09:21:13Z Denis Fedoseev # +images to album mapping diff --git a/sql/verify/users.sql b/sql/verify/users.sql index f5d4aa8..9e0aef0 100644 --- a/sql/verify/users.sql +++ b/sql/verify/users.sql @@ -2,7 +2,7 @@ BEGIN; -SELECT nickname, password, fullname, twitter +SELECT user_id, nickname, password, fullname, timestamp FROM users WHERE 0;