· 8 years ago · Apr 23, 2018, 03:56 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 foreign key(orgId) references organisation(id) on delete set null,
15 email varchar(255) not null,
16 name varchar(255) not null,
17 password varchar(255) not null
18);
19
20
21# --- !Downs
22
23drop table if exists users;
24drop table if exists organisations;