-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathdbdiff.yml.example
More file actions
92 lines (84 loc) · 4.11 KB
/
dbdiff.yml.example
File metadata and controls
92 lines (84 loc) · 4.11 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
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
88
89
90
91
92
# dbdiff.yml — DBDiff configuration
#
# This single file configures both the diff command and the migration runner.
# Copy it to dbdiff.yml in your project root and fill in your values.
#
# Auto-detected filenames (in priority order):
# .dbdiff ← legacy plain-text YAML (no extension, no syntax highlighting)
# dbdiff.yml ← recommended going forwards
# .dbdiff.yml
# dbdiff.yaml
#
# Command-line flags always override values in this file.
# ─────────────────────────────────────────────────────────────────────────────
# ── Diff command ──────────────────────────────────────────────────────────────
# Used by: ./dbdiff server1.db:server2.db
# server1 / server2 can be the same host — just specify two database names.
server1:
user: user
password: password
port: 3306 # MySQL: 3306 | PostgreSQL: 5432
host: 127.0.0.1
server2:
user: user
password: password
port: 3306
host: 127.0.0.1
driver: mysql # mysql | pgsql | sqlite
type: schema # schema | data | all
include: up # up | down | both
nocomments: false
format: native # native | flyway | liquibase-xml | liquibase-yaml | laravel
# ── Database connection ───────────────────────────────────────────────────────
# Used by: dbdiff migration:up / migration:down / migration:status
# Typically this points to one database (the target you are migrating).
database:
driver: mysql # mysql | pgsql | sqlite
host: 127.0.0.1
port: 3306
name: mydb # For SQLite, use `path` instead:
# path: ./database.sqlite
user: root
password: secret
# sslmode: require # Needed for Supabase / production Postgres
# ── Migrations ────────────────────────────────────────────────────────────────
migrations:
dir: ./migrations # Where migration files are stored
history_table: _dbdiff_migrations # Tracking table (created automatically)
out_of_order: false # Allow applying older versions after newer ones
format: native # native | supabase
# native — {version}_{desc}.up.sql + optional .down.sql
# supabase — {version}_{desc}.sql (UP-only)
# Auto-set to 'supabase' when supabase/config.toml is detected
# ── Supabase (Postgres) ───────────────────────────────────────────────────────
# Option A — paste a connection string directly (simplest):
#
# database:
# url: postgres://postgres.PROJREF:PASSWORD@aws-0-REGION.pooler.supabase.com:5432/postgres
#
# The `url` key overrides individual host/user/password/port values.
# SSL is automatically enabled when a Supabase hostname is detected.
#
# Option B — session-mode connection pooler (port 6543, pgbouncer):
#
# database:
# url: postgres://postgres.PROJREF:PASSWORD@aws-0-REGION.pooler.supabase.com:6543/postgres
#
# pgbouncer mode is auto-enabled on port 6543 (sets PDO emulate_prepares = true).
#
# Option C — explicit fields (equivalent to Option A without URL parsing):
#
# database:
# driver: pgsql
# host: db.PROJREF.supabase.co
# port: 5432
# name: postgres
# user: postgres
# password: your-db-password
# sslmode: require
#
# Diff against two Supabase projects on the command line (no config file needed):
#
# dbdiff diff \
# --server1-url postgres://postgres.ABC:PASS@aws-0-us-east-1.pooler.supabase.com:5432/postgres \
# --server2-url postgres://postgres.XYZ:PASS@aws-0-us-east-1.pooler.supabase.com:5432/staging