-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sql
25 lines (20 loc) · 882 Bytes
/
init.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use luke_dev;
-- Note all tables are temporary until proper schemas are defined
-- Table structure for users
CREATE TABLE IF NOT EXISTS users (
id int(11) NOT NULL,
email varchar(200) NOT NULL,
password varchar(200) NOT NULL,
created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE users ADD PRIMARY KEY (id);
ALTER TABLE users ADD UNIQUE (email);
ALTER TABLE users MODIFY id int(11) NOT NULL AUTO_INCREMENT;
INSERT INTO users (id, email, password, created_at) VALUES
(1, '[email protected]', 'password1', '2019-02-28 13:20:20'),
(2, '[email protected]', 'password2', '2019-02-28 13:20:20'),
(3, '[email protected]', 'password3', '2019-02-28 13:20:20'),
(4, '[email protected]', 'password4', '2019-02-28 13:20:20'),
(5, '[email protected]', 'password5', '2019-02-28 13:20:20');
-- End of setup, queries go below
select * from users;