-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathuser.sql
More file actions
55 lines (51 loc) · 1.22 KB
/
user.sql
File metadata and controls
55 lines (51 loc) · 1.22 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
CREATE SCHEMA IF NOT EXISTS comics;
-- drop schema comics;
use comics;
CREATE TABLE users (
username varchar(255) NOT NULL,
password varchar (255),
avatar text,
gmail varchar(255),
role varchar (255),
age int,
favorite varchar(255),
comics_followed text,
PRIMARY KEY (username)
);
select * from users;
insert into users(username, password, avatar, gmail, role, age, favorite, comics_followed)
values ('g12', '123', 'https://i.imgur.com/HZ86ajE.png', 'g12@usth', 'Admin', '20','','');
-- drop table users;
CREATE TABLE comics (
title varchar(255) NOT NULL,
author varchar(255),
artist varchar(255),
publisher varchar(255),
public_date date,
genre varchar(255),
volume int,
series varchar(255),
cover_image text,
language varchar(255),
synopsis text,
PRIMARY KEY (title)
);
select * from comics;
-- drop table comics;
CREATE TABLE followed_comics (
numlist int AUTO_INCREMENT,
title varchar(255),
username varchar(255),
PRIMARY KEY (numlist)
);
select * from followed_comics;
drop table followed_comics;
CREATE TABLE sort (
order_by varchar(255),
PRIMARY KEY (
order_by
)
);
select * from sort;
-- delete from sort;
-- drop table sort;