-
Notifications
You must be signed in to change notification settings - Fork 0
/
sql.txt
37 lines (32 loc) · 1005 Bytes
/
sql.txt
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
create table profile (
porfile_id bigint not null auto_increment,
nick_name varchar(255),
profile varchar(255),
seguidos varbinary(255),
telefono varchar(255),
user_id bigint,
primary key (porfile_id)
) engine=InnoDB
create table publications (
id bigint not null auto_increment,
body varchar(255),
date datetime(6),
user_id bigint,
primary key (id)
) engine=InnoDB
create table users (
id bigint not null auto_increment,
email varchar(255),
last_name varchar(255),
name varchar(255),
password varchar(255),
primary key (id)
) engine=InnoDB
alter table profile
add constraint FKs14jvsf9tqrcnly0afsv0ngwv
foreign key (user_id)
references users (id)
alter table publications
add constraint FK2utvp9h7ybh77dgki0cfw52c1
foreign key (user_id)
references users (id)