· 8 years ago · Apr 23, 2018, 04:08 PM
1# Users schema
2
3# --- !Ups
4
5create table organisation (
6 id varchar(255) not null primary key,
7 email varchar(255) not null,
8 name varchar(255) not null,
9 password varchar(255) not null
10);
11
12create table user (
13 id varchar(255) not null primary key,
14 email varchar(255) not null,
15 name varchar(255) not null,
16 password varchar(255) not null,
17 foreign key(org_id) references organisation(id) on delete set null
18);
19
20
21# --- !Downs
22
23drop table if exists users;
24drop table if exists organisations;