-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwrangler.toml
59 lines (55 loc) · 2.7 KB
/
wrangler.toml
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
name = "cherrylanefarmdoodles"
compatibility_date = "2024-09-23"
compatibility_flags = ["nodejs_compat"]
pages_build_output_dir = '.vercel/output/static'
# In order to switch between two different D1 Databases based on environment,
# their must be two databases. Each database must have it's own unique name and
# binding.
# The databases must both be defined globally and then again in each
# environment since environments don't inherit from the global level. The
# global binding is used by wrangler. The environment bindings are used by the
# code.
#
# Since we have two databases, both must have their own binding and namespace.
# Additionally both namespaces and bindings must be included in each
# environment. The workaround to ensure that one environment does not leave
# it's database isolate is to switch the database_id's for both of these
# bindings.
[[d1_databases]]
binding = "dogsDB"
database_name = "dogs"
database_id = "d2d75c27-4175-4ac1-81e4-c6412970e2fb"
migrations_dir = "test/test_integration/migrations"
migrations_table = 'd1_migrations'
# The dogs-test binding is not used anywhere in the code and is only included
# here to ensure that the databases can be switched based on the environment.
[[d1_databases]]
binding = "dogsDB_testing"
database_name = "dogs-test"
database_id = "7f0def0b-60b1-46c8-978c-f1756fbc17a2"
migrations_dir = "test/test_integration/migrations"
migrations_table = 'd1_migrations'
[env.production]
kv_namespaces = [
{ binding = "__NEXT_ON_PAGES__KV_SUSPENSE_CACHE", id = "32b954be1e5845b5b8b11186ae8f35fd" }
]
d1_databases = [
{ binding = "dogsDB_testing", database_name = "dogs-test", database_id = "d2d75c27-4175-4ac1-81e4-c6412970e2fb", migrations_dir = "test/test_integration/migrations", migrations_table = 'd1_migrations' },
{ binding = "dogsDB", database_name = "dogs", database_id = "d2d75c27-4175-4ac1-81e4-c6412970e2fb", migrations_dir = "test/test_integration/migrations", migrations_table = 'd1_migrations' }
]
r2_buckets = [
{ binding = "dogImages", bucket_name = "cherrylanefarmpics" }
]
# Entirely isolated preview environment for testing
[env.preview]
name = "cherrylanetesting"
kv_namespaces= [
{ binding = "__NEXT_ON_PAGES__KV_SUSPENSE_CACHE", id = "eb878d0ff59d4de5b61c349ab605febc" }
]
d1_databases = [
{ binding = "dogsDB_testing", database_name = "dogs-test", database_id = "7f0def0b-60b1-46c8-978c-f1756fbc17a2", migrations_dir = "test/test_integration/migrations", migrations_table = 'd1_migrations' },
{ binding = "dogsDB", database_name = "dogs", database_id = "7f0def0b-60b1-46c8-978c-f1756fbc17a2", migrations_dir = "test/test_integration/migrations", migrations_table = 'd1_migrations' }
]
r2_buckets = [
{ binding = "dogImages", bucket_name = "cherrylanetesting" }
]