-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatlas.hcl
More file actions
47 lines (40 loc) · 1.05 KB
/
atlas.hcl
File metadata and controls
47 lines (40 loc) · 1.05 KB
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
variable "database_url" {
type = string
default = getenv("DATABASE_URL")
}
variable "sources" {
type = list(string)
default = [
"file://internal/database/schema/schema.hcl",
"file://internal/database/schema/accounts.hcl",
"file://internal/database/schema/app.hcl",
"file://internal/database/schema/auth.hcl",
"file://internal/database/schema/discord.hcl",
"file://internal/database/schema/glossary.hcl",
"file://internal/database/schema/users.hcl",
]
}
env "local" {
src = var.sources
migration {
dir = "file://internal/database/migrations?format=golang-migrate"
}
url = var.database_url
dev = "docker://postgres/17/dev?search_path=public"
}
env "migrate" {
src = [
"file:///schema/schema.hcl",
"file:///schema/accounts.hcl",
"file:///schema/app.hcl",
"file:///schema/auth.hcl",
"file:///schema/discord.hcl",
"file:///schema/glossary.hcl",
"file:///schema/users.hcl",
]
migration {
dir = "file:///migrations?format=golang-migrate"
}
tx-mode = "all"
url = var.database_url
}