Database support #1
3 changed files with 10 additions and 6 deletions
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue