Skip to content

Commit ea7a1a0

Browse files
committed
diesel-guard: Add configuration file
Migrations prior to `2025-09-04` unfortunately result in SQL parser issues due to unsupported constructs.
1 parent a5a6261 commit ea7a1a0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

diesel-guard.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# diesel-guard configuration file
2+
3+
# Skip checking migrations created before this timestamp
4+
# Useful for retrofitting diesel-guard into existing projects
5+
# Accepted formats: YYYYMMDDHHMMSS, YYYY_MM_DD_HHMMSS, or YYYY-MM-DD-HHMMSS
6+
# Works with any migration directory format regardless of separator style
7+
#
8+
# Examples: Skip all migrations before January 1, 2024
9+
# start_after = "2024_01_01_000000" # underscores
10+
# start_after = "2024-01-01-000000" # dashes
11+
# start_after = "20240101000000" # no separators
12+
start_after = "2025-09-04-000000"
13+
14+
# Whether to check down.sql files in addition to up.sql
15+
# Default: false
16+
#
17+
# Set to true if you want to ensure rollback migrations are also safe
18+
# check_down = false
19+
20+
# Disable specific safety checks
21+
# Valid check names:
22+
# - AddColumnCheck (ADD COLUMN with DEFAULT)
23+
# - AddIndexCheck (CREATE INDEX without CONCURRENTLY)
24+
# - AddNotNullCheck (ALTER COLUMN SET NOT NULL)
25+
# - AlterColumnTypeCheck (ALTER COLUMN TYPE)
26+
# - DropColumnCheck (DROP COLUMN)
27+
#
28+
# Example: Disable checking for ADD COLUMN and DROP COLUMN operations
29+
# disable_checks = ["AddColumnCheck", "DropColumnCheck"]
30+
#
31+
# Default: [] (all checks enabled)
32+
disable_checks = ["AddColumnCheck"]

0 commit comments

Comments
 (0)