You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/controlplane/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,8 +78,8 @@ The way you can make a change in the data model is
78
78
79
79
**Update the schema**
80
80
- 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`.
83
83
84
84
**Apply the schema change in development DB**
85
85
-`make migration_apply` will apply the migration to the development database
0 commit comments