Skip to content

Commit f2c2c2c

Browse files
committed
Add initial agent guidelines for generating migrations
1 parent 8a1280e commit f2c2c2c

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

migrations/AGENTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Agent guidelines for Dirigent development: migrations/
2+
3+
## Generate new migrations
4+
5+
To generate a new migration, execute the `symfony console doctrine:migrations:diff --nowdoc --formatted` command.
6+
7+
## Coding style
8+
9+
- Every migration must have a non-empty description.
10+
- Queries should be wrapped in nowdoc by default. Only if a PHP variable is used in the query is it allowed to be wrapped in heredoc.
11+
12+
## Required columns
13+
14+
If a required (non-nullable) column is added to the schema, add it with the following queries:
15+
16+
1. Add a nullable column.
17+
2. Set a default value for every row in the table.
18+
3. Remove the nullable flag from the column.

migrations/CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Agent guidelines for Dirigent development in Claude Code: migrations/
2+
3+
@AGENTS.md

0 commit comments

Comments
 (0)