Database changes

This commit is contained in:
Denis Fedoseev 2017-07-22 18:33:04 +09:00
parent 8961893b43
commit 0030adabab
3 changed files with 10 additions and 6 deletions

View file

@ -3,11 +3,12 @@
BEGIN; BEGIN;
CREATE TABLE users ( CREATE TABLE users (
nickname TEXT PRIMARY KEY, nickname TEXT,
password TEXT NOT NULL, password TEXT NOT NULL,
fullname TEXT NOT NULL, fullname TEXT NOT NULL,
twitter TEXT NOT NULL, timestamp DATETIME NOT NULL
timestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
user_id INTEGER PRIMARY KEY AUTOINCREMENT
); );
COMMIT; COMMIT;

View file

@ -4,3 +4,6 @@
users 2017-07-22T06:53:03Z Denis Fedoseev <denis.fedoseev@gmail.com> # Creates table to track our users. users 2017-07-22T06:53:03Z Denis Fedoseev <denis.fedoseev@gmail.com> # Creates table to track our users.
images 2017-07-22T07:17:52Z Denis Fedoseev <denis.fedoseev@gmail.com> # Creates table to track users images. images 2017-07-22T07:17:52Z Denis Fedoseev <denis.fedoseev@gmail.com> # Creates table to track users images.
albums 2017-07-22T08:50:11Z Denis Fedoseev <denis.fedoseev@gmail.com> # Albums database init
user_images [users images] 2017-07-22T09:16:20Z Denis Fedoseev <denis.fedoseev@gmail.com> # +user_images table
album_images [images albums] 2017-07-22T09:21:13Z Denis Fedoseev <denis.fedoseev@gmail.com> # +images to album mapping

View file

@ -2,7 +2,7 @@
BEGIN; BEGIN;
SELECT nickname, password, fullname, twitter SELECT user_id, nickname, password, fullname, timestamp
FROM users FROM users
WHERE 0; WHERE 0;