Skip to content

Commit 5f19918

Browse files
authored
docs(controlplane): fix stale schema change instructions (#3456)
Signed-off-by: Tomasz Edward Posluszny <tom@devpeer.net>
1 parent 26a6cec commit 5f19918

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎app/controlplane/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ The way you can make a change in the data model is
7878

7979
**Update the schema**
8080
- Add a new/update an existing entity via a schema update. Schemas can be found at `pkg/data/ent/schema`
81-
- Generate the code changes associated with that schema change. `make generate`
82-
- Generate a new versioned migration `make migration_new`. This will create a new migration file at `pkg/data/ent/migrate/migrations
81+
- Run `make -C app/controlplane generate`. It generates both the code changes associated with that schema change and, via `make migration_sync`, a new versioned migration at `pkg/data/ent/migrate/migrations`. Review and commit that generated file - do not hand-write it. Note the root `make generate` does **not** write migrations.
82+
- If the change also needs a data backfill, add a **second**, hand-written migration with `make -C app/controlplane migration_new` (which creates an empty file), as in the `last_run_at` backfill `20251001215625.sql`.
8383

8484
**Apply the schema change in development DB**
8585
- `make migration_apply` will apply the migration to the development database

0 commit comments

Comments
 (0)