@@ -2,22 +2,26 @@ CREATE DATABASE all_the_things;
2
2
USE all_the_things;
3
3
4
4
CREATE TABLE lonely_heroes (
5
- id INT unsigned NOT NULL AUTO_INCREMENT,
5
+ id INT unsigned NOT NULL AUTO_INCREMENT,
6
6
name VARCHAR (150 ) NOT NULL ,
7
+ email VARCHAR (150 ),
7
8
has_ponycopter BOOLEAN NOT NULL default FALSE,
9
+ access_level INT unsigned NOT NULL default 0 , # NOTE: This means anyone who can read can see the access levels.
10
+ image VARCHAR (1024 ) default " https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/The_Jolly_Nero.jpg/1024px-The_Jolly_Nero.jpg" ,
8
11
PRIMARY KEY (id)
9
12
);
10
13
11
14
# Not needed but nice for debug output
12
15
DESCRIBE lonely_heroes;
13
16
14
- INSERT INTO lonely_heroes (name, has_ponycopter) VALUES
15
- (' Superman' , TRUE),
16
- (' Batman' , FALSE),
17
- (' Chuck' , TRUE),
18
- (' Pinky Pie' , TRUE);
19
-
20
-
17
+ # Add your own gmail user here!
18
+ INSERT INTO lonely_heroes (name, email, has_ponycopter, access_level, image) VALUES
19
+ (' Superman' , NULL , TRUE, 0 , " https://i.pinimg.com/originals/14/86/36/1486361592bfd0866cd900572833db0f.jpg" ),
20
+ (' Batman' , NULL , FALSE, 0 , " https://i.ytimg.com/vi/RDhfnPSTqmk/maxresdefault.jpg" ),
21
+ (' Chuck' , NULL , TRUE, 100 , DEFAULT),
22
+ (
' Derek B.' ,
' [email protected] ' ,TRUE,
10 , DEFAULT),
23
+ (
' Alfred' ,
' [email protected] ' ,FALSE,
100 , DEFAULT),
24
+ (' Pinky Pie' ,NULL ,TRUE, 1000 , " https://static.wikia.nocookie.net/mlp/images/b/b2/Pinkie_Pie_ID_S4E11.png" );
21
25
22
26
# Not needed but nice for debug output
23
27
SELECT * FROM lonely_heroes;
0 commit comments