-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathschema.sql
More file actions
31 lines (25 loc) · 801 Bytes
/
Copy pathschema.sql
File metadata and controls
31 lines (25 loc) · 801 Bytes
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
create database database1 default charset=utf8;
create user 'user'@'localhost' identified by 'password';
grant all on database1.* to 'user'@'localhost';
-- set password for 'user'@'localhost' = password('');
use database1;
-- drop table if exists users;
create table users (
id serial,
email nvarchar(200) unique,
password varchar(2048),
name nvarchar(2048)
);
insert into users(name, email, password)
values('User', 'user@codestar.work', sha2('password', 256));
insert into users(name, email, password)
values('Support', 'support@codestar.work', sha2('password', 256));
-- drop table if exists posts;
create table posts (
id serial,
user bigint,
topic nvarchar(2048),
detail nvarchar(16384),
file nvarchar(1024)
);
-- end