-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
schema.hcl
88 lines (84 loc) · 1.29 KB
/
schema.hcl
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
schema "main" {
}
table "users" {
schema = schema.main
column "id" {
type = text
}
column "created_at" {
type = datetime
}
column "updated_at" {
type = datetime
}
primary_key {
columns = [column.id]
}
index "idx_users_created_at" {
columns = [column.created_at]
}
}
table "public_keys" {
schema = schema.main
column "id" {
type = text
}
column "created_at" {
type = datetime
}
column "updated_at" {
type = datetime
}
column "fingerprint" {
type = text
}
column "type" {
type = text
}
column "user_id" {
type = text
}
primary_key {
columns = [column.id]
}
index "idx_public_keys_created_at" {
columns = [column.created_at]
}
index "idx_pubkey_fingerprint" {
unique = true
columns = [column.fingerprint]
}
}
table "files" {
schema = schema.main
column "id" {
type = text
}
column "created_at" {
type = datetime
}
column "updated_at" {
type = datetime
}
column "size" {
type = integer
}
column "content" {
type = blob
}
column "private" {
type = numeric
}
column "type" {
type = text
}
column "user_id" {
type = text
}
primary_key {
columns = [column.id]
}
index "idx_files_created_at" {
columns = [column.created_at]
}
}