-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml
More file actions
54 lines (46 loc) · 2.03 KB
/
wrangler.toml
File metadata and controls
54 lines (46 loc) · 2.03 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
48
49
50
51
52
53
54
# ==============================================================================
# SOLAR MINING CALCULATOR - DATABASE CONFIGURATION
# ==============================================================================
#
# Dedicated configuration for database operations (migrations, seeding, etc.)
# This file is separate from worker configurations for cleaner separation of concerns.
#
# Usage:
# - Database migrations: wrangler d1 execute [db-name] --file=migration.sql
# - Database seeding: wrangler d1 execute [db-name] --file=seed.sql
# - Database management: wrangler d1 [command] [db-name]
# ==============================================================================
name = "solar-mining-database"
# =============================================================================
# DATABASE BINDINGS - Root level for direct access
# =============================================================================
# Development Database
[[d1_databases]]
binding = "DB_DEV"
database_name = "solar-mining-db-dev"
database_id = "435d8973-cd30-4d83-bb9f-a37c09190695"
# Production Database
[[d1_databases]]
binding = "DB_PROD"
database_name = "solar-mining-db"
database_id = "6967c156-01e7-4469-b331-69a33240c796"
# =============================================================================
# ENVIRONMENT CONFIGURATION
# =============================================================================
# Development environment
[env.development]
name = "solar-mining-database-dev"
# Production environment
[env.production]
name = "solar-mining-database"
# =============================================================================
# NOTES
# =============================================================================
#
# This configuration allows direct database access without environment complexity:
# - wrangler d1 execute solar-mining-db-dev --file=migration.sql
# - wrangler d1 execute solar-mining-db --file=migration.sql
#
# Worker configurations (wrangler.api.toml, etc.) handle worker-specific bindings
# This file handles database-specific operations
#