Skip to content

Commit 9260a7f

Browse files
committed
SQL: Add image links, email and access levels
1 parent 8ff44f1 commit 9260a7f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

sql/my_database.sql

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,26 @@ CREATE DATABASE all_the_things;
22
USE all_the_things;
33

44
CREATE TABLE lonely_heroes (
5-
id INT unsigned NOT NULL AUTO_INCREMENT,
5+
id INT unsigned NOT NULL AUTO_INCREMENT,
66
name VARCHAR(150) NOT NULL,
7+
email VARCHAR(150),
78
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",
811
PRIMARY KEY (id)
912
);
1013

1114
# Not needed but nice for debug output
1215
DESCRIBE lonely_heroes;
1316

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");
2125

2226
# Not needed but nice for debug output
2327
SELECT * FROM lonely_heroes;

0 commit comments

Comments
 (0)