-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.dbml
49 lines (44 loc) · 1.08 KB
/
database.dbml
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
Table addons {
id integer [pk, increment]
authorId integer [ref: - users.id]
organisationId integer [ref: - organisations.id]
name varchar(35) [not null]
description varchar(120) [not null]
latest varchar(20)
createdAt datetime
updatedAt datetime
}
Table versions {
id integer [pk, increment]
addonId integer [ref: > addons.id]
version varchar(20)
git varchar(120)
createdAt datetime
}
Table users {
id integer [pk, increment]
username varchar(40) [not null]
active boolean [not null, default: false]
email varchar [not null, unique]
password varchar(240) [not null]
createdAt datetime
updatedAt datetime
}
Table organisations {
id integer [pk, increment]
name varchar(35) [not null]
description varchar(120)
ownerId integer [not null, ref: - users.id]
createdAt datetime
updatedAt datetime
}
Table orgausers {
organisationId integer [not null, ref: - organisations.id]
userId integer [not null, ref: - users.id]
createdAt datetime
updatedAt datetime
}
Table tokens {
token varchar(36) [not null]
userId integer [not null, ref: - users.id]
}