@quickback-dev/cli 0.68.0 → 0.70.0

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.
Files changed (38) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/audit-canon.js +3 -3
  3. package/dist/lib/audit-canon.js.map +1 -1
  4. package/dist/skill/docs/api/actions.md +2 -0
  5. package/dist/skill/docs/api/errors.md +1 -0
  6. package/dist/skill/docs/api/query-params.md +1 -1
  7. package/dist/skill/docs/configure/providers.md +4 -2
  8. package/dist/skill/docs/define/actions/scoped-db.md +14 -13
  9. package/dist/skill/docs/define/areas.md +1 -1
  10. package/dist/skill/docs/define/bundles.md +23 -3
  11. package/dist/skill/docs/define/escape-hatches.md +2 -2
  12. package/dist/skill/docs/define/firewall.md +2 -1
  13. package/dist/skill/docs/define/schema.md +12 -2
  14. package/dist/skill/docs/define/scopes.md +7 -1
  15. package/dist/skill/docs/define/triggers.md +33 -3
  16. package/dist/skill/docs/platform/auth/security.md +2 -1
  17. package/dist/skill/docs/platform/database/neon.md +62 -14
  18. package/dist/skill/docs/platform/database/planetscale-postgres.md +27 -0
  19. package/dist/skill/docs/tooling/claude-skill.md +1 -1
  20. package/dist/skill/docs/tooling/troubleshooting.md +37 -0
  21. package/package.json +1 -1
  22. package/src/skill/docs/api/actions.md +2 -0
  23. package/src/skill/docs/api/errors.md +1 -0
  24. package/src/skill/docs/api/query-params.md +1 -1
  25. package/src/skill/docs/configure/providers.md +4 -2
  26. package/src/skill/docs/define/actions/scoped-db.md +14 -13
  27. package/src/skill/docs/define/areas.md +1 -1
  28. package/src/skill/docs/define/bundles.md +23 -3
  29. package/src/skill/docs/define/escape-hatches.md +2 -2
  30. package/src/skill/docs/define/firewall.md +2 -1
  31. package/src/skill/docs/define/schema.md +12 -2
  32. package/src/skill/docs/define/scopes.md +7 -1
  33. package/src/skill/docs/define/triggers.md +33 -3
  34. package/src/skill/docs/platform/auth/security.md +2 -1
  35. package/src/skill/docs/platform/database/neon.md +62 -14
  36. package/src/skill/docs/platform/database/planetscale-postgres.md +27 -0
  37. package/src/skill/docs/tooling/claude-skill.md +1 -1
  38. package/src/skill/docs/tooling/troubleshooting.md +37 -0
@@ -107,6 +107,43 @@ Quickback now adds a D1-specific safety pass around Drizzle-generated migrations
107
107
 
108
108
  If `quickback build` now fails with a D1 replay error, treat that as a real migration problem instead of a deploy-time surprise. The generated SQL needs manual intervention or a schema change that Drizzle can express more safely.
109
109
 
110
+ ### Postgres: column "…" cannot be cast automatically
111
+
112
+ On Postgres providers (`neon`, `planetscale-postgres`), Drizzle emits a column
113
+ type change as a bare `ALTER COLUMN … SET DATA TYPE`, which Postgres refuses
114
+ when no implicit cast exists — for example when the `text` audit columns of a
115
+ pre-0.68 journal become `timestamptz`. In a newly generated migration,
116
+ Quickback rewrites a change to a timestamp, date/time, numeric, boolean,
117
+ `uuid`, or `json`/`jsonb` type as `SET DATA TYPE <type> USING "<col>"::<type>`,
118
+ so existing rows convert in place. It drops the column's old default first when
119
+ the same migration sets or drops it afterwards; a default is never removed
120
+ otherwise.
121
+
122
+ Changes to length-limited types (`varchar(n)`, `char(n)`, `bit(n)`) and arrays
123
+ stay bare: an explicit cast would silently truncate values the bare statement
124
+ rejects. Add `USING` by hand if you need one there.
125
+
126
+ Existing migrations are never rewritten. If an earlier compiler generated a
127
+ type-change migration that fails with this error, it never applied — `npm run
128
+ db:migrate` runs pending migrations in one transaction, and a failure records
129
+ nothing in `drizzle.__drizzle_migrations`. Fix it in one of two ways:
130
+
131
+ - **It is the newest migration:** delete that `.sql` file, its
132
+ `meta/NNNN_snapshot.json`, and its `meta/_journal.json` entry, then rebuild
133
+ to regenerate it.
134
+ - **Later migrations follow it:** edit the failing statement in place before
135
+ applying it. Add `USING "<col>"::<type>` and, if the column has a default
136
+ that cannot be cast, a `DROP DEFAULT` statement before it:
137
+
138
+ ```sql
139
+ ALTER TABLE "app"."events" ALTER COLUMN "created_at" DROP DEFAULT;
140
+ --> statement-breakpoint
141
+ ALTER TABLE "app"."events" ALTER COLUMN "created_at" SET DATA TYPE timestamp with time zone USING "created_at"::timestamp with time zone;
142
+ ```
143
+
144
+ The drizzle migrator does not compare hashes of applied migrations, and a
145
+ recompile hands the edited file back unchanged.
146
+
110
147
  ### Recompile changed the comments at the top of an old migration
111
148
 
112
149
  A recompile hands every existing migration back byte-for-byte, including the