@mindstudio-ai/remy 0.1.334 → 0.1.335
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,7 +19,7 @@ The dev session gets its own database — a snapshot of the live database at ses
|
|
|
19
19
|
- **Truncate** — keep the schema, delete all row data (used by scenarios for a clean canvas)
|
|
20
20
|
- **Schema sync** — add a field to a table interface and it's immediately available in dev
|
|
21
21
|
|
|
22
|
-
The dev database is disposable
|
|
22
|
+
The dev database's data is disposable — reset or truncate it whenever that helps. Just be considerate that the user may have created their own data (user rows or other data) while testing, and it might be frustrating for them to have it wiped. If a schema sync fails, the error names the table and what is out of step between the platform's schema record and the table itself; fix exactly that.
|
|
23
23
|
|
|
24
24
|
### Debugging
|
|
25
25
|
|
|
@@ -389,20 +389,14 @@ const [_, newOrder, pending] = await db.batch(
|
|
|
389
389
|
|
|
390
390
|
## Migrations
|
|
391
391
|
|
|
392
|
-
No migration files.
|
|
393
|
-
- **New tables** —
|
|
394
|
-
- **New columns** —
|
|
395
|
-
- **Dropped
|
|
396
|
-
- **
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
4. Applies to a staging copy of the database
|
|
404
|
-
5. Promotes the staging copy to live
|
|
405
|
-
|
|
406
|
-
The TypeScript interface is the single source of truth for the schema. Add a field to the interface, push, and the column exists. No migration files, no CLI commands.
|
|
407
|
-
|
|
408
|
-
**In development**, schema changes are synced automatically to the dev database. The dev database is a disposable snapshot — it can be reset to a fresh copy of production data or truncated to empty tables at any time. There's no risk of breaking anything by experimenting with schema changes in dev.
|
|
392
|
+
No migration files. The table's TypeScript interface is the schema, and the platform brings the database to match it:
|
|
393
|
+
- **New tables** — created
|
|
394
|
+
- **New, dropped, or retyped columns, and changed `unique` constraints** — the table is rebuilt: a table with the declared shape is created, every row is copied across, and it replaces the old one in one transaction. New columns arrive empty; dropped columns and their data are gone; a retyped column's values are carried across, converted where SQLite can.
|
|
395
|
+
- **Dropped tables** — dropped when the table file is removed from the manifest
|
|
396
|
+
- **Renames** — not detected; a renamed column or table is a drop plus an add, and its data does not carry over
|
|
397
|
+
|
|
398
|
+
On deploy, the platform parses the table files, diffs against the live schema, applies the changes to a clone of the live database, and promotes the clone. If any change fails, the release fails and the live database is untouched.
|
|
399
|
+
|
|
400
|
+
Add a field to the interface, push, and the column exists. No migration files, no CLI commands.
|
|
401
|
+
|
|
402
|
+
**In development**, schema changes are applied to the dev database automatically, by the same rules. Its data is disposable — it can be reset to a fresh copy of production or truncated to empty tables at any time. If a schema sync fails, the error names the table and what is out of step between the platform's schema record and the table itself; fix exactly that.
|