@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.
- package/dist/index.js +1 -1
- package/dist/lib/audit-canon.js +3 -3
- package/dist/lib/audit-canon.js.map +1 -1
- package/dist/skill/docs/api/actions.md +2 -0
- package/dist/skill/docs/api/errors.md +1 -0
- package/dist/skill/docs/api/query-params.md +1 -1
- package/dist/skill/docs/configure/providers.md +4 -2
- package/dist/skill/docs/define/actions/scoped-db.md +14 -13
- package/dist/skill/docs/define/areas.md +1 -1
- package/dist/skill/docs/define/bundles.md +23 -3
- package/dist/skill/docs/define/escape-hatches.md +2 -2
- package/dist/skill/docs/define/firewall.md +2 -1
- package/dist/skill/docs/define/schema.md +12 -2
- package/dist/skill/docs/define/scopes.md +7 -1
- package/dist/skill/docs/define/triggers.md +33 -3
- package/dist/skill/docs/platform/auth/security.md +2 -1
- package/dist/skill/docs/platform/database/neon.md +62 -14
- package/dist/skill/docs/platform/database/planetscale-postgres.md +27 -0
- package/dist/skill/docs/tooling/claude-skill.md +1 -1
- package/dist/skill/docs/tooling/troubleshooting.md +37 -0
- package/package.json +1 -1
- package/src/skill/docs/api/actions.md +2 -0
- package/src/skill/docs/api/errors.md +1 -0
- package/src/skill/docs/api/query-params.md +1 -1
- package/src/skill/docs/configure/providers.md +4 -2
- package/src/skill/docs/define/actions/scoped-db.md +14 -13
- package/src/skill/docs/define/areas.md +1 -1
- package/src/skill/docs/define/bundles.md +23 -3
- package/src/skill/docs/define/escape-hatches.md +2 -2
- package/src/skill/docs/define/firewall.md +2 -1
- package/src/skill/docs/define/schema.md +12 -2
- package/src/skill/docs/define/scopes.md +7 -1
- package/src/skill/docs/define/triggers.md +33 -3
- package/src/skill/docs/platform/auth/security.md +2 -1
- package/src/skill/docs/platform/database/neon.md +62 -14
- package/src/skill/docs/platform/database/planetscale-postgres.md +27 -0
- package/src/skill/docs/tooling/claude-skill.md +1 -1
- 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
|