create-rindle 0.7.4 → 0.7.5
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.
package/package.json
CHANGED
|
@@ -34,10 +34,11 @@ Break one of these and the app goes subtly wrong. Treat violations as bugs in
|
|
|
34
34
|
review:
|
|
35
35
|
|
|
36
36
|
1. **SQL is the source of truth.** Change the schema by **adding** a
|
|
37
|
-
`migrations/*.sql` file (
|
|
38
|
-
`CREATE INDEX
|
|
39
|
-
`
|
|
40
|
-
|
|
37
|
+
`migrations/*.sql` file (SQL DDL: `CREATE TABLE` / `ADD COLUMN` /
|
|
38
|
+
`CREATE INDEX`, plus the destructive `DROP TABLE` / `DROP COLUMN` /
|
|
39
|
+
`DROP INDEX` — no `RENAME`; every table a single primary key). **Never
|
|
40
|
+
hand-edit `shared/schema.gen.ts`** — it is generated from the live daemon
|
|
41
|
+
and overwritten on the next migration.
|
|
41
42
|
2. **Mutators are one isomorphic body, deterministic and replayable**
|
|
42
43
|
(`shared/app-def.ts`): a generator that `yield`s logical ops
|
|
43
44
|
(`yield tx.insert(...)`), paired with its zod arg schema via
|