failed migration in #226 #101

Closed
opened 2026-10-05 01:41:31 +02:00 by adam · 3 comments
Owner

migration has failed on this update.

3749 | const staticQuery = this.dialect.sqlToQuery(query);
3750 | try {
3751 | return this.prepareOneTimeQuery(staticQuery, undefined, "run", false).run();
3752 | throw new DrizzleError({ cause: err, message: Failed to run the query '${staticQuery.sql}' });
^
DrizzleError: Failed to run the query 'ALTER TABLE repositories ADD imported_at integer DEFAULT (unixepoch()) NOT NULL;'
at run (/app/dist/scripts/repair-mirrored-repos.js:3752:13)
at migrate (/app/dist/scripts/repair-mirrored-repos.js:2726:24)
at migrate (/app/dist/scripts/repair-mirrored-repos.js:3985:21)
at runDrizzleMigrations (/app/dist/scripts/repair-mirrored-repos.js:18054:14)
at /app/dist/scripts/repair-mirrored-repos.js:18078:23
at loadAndEvaluateModule (2:1)
133 | return this.#raw.values();
134 | }
135 | #rawNoArgs() {
136 | return this.#raw.raw();
137 | }
138 | return this.#raw.run(internalFieldTuple), createChangesObject();
^
SQLiteError: Cannot add a column with non-constant default
migration has failed on this update. ``` 3749 | const staticQuery = this.dialect.sqlToQuery(query); 3750 | try { 3751 | return this.prepareOneTimeQuery(staticQuery, undefined, "run", false).run(); 3752 | throw new DrizzleError({ cause: err, message: Failed to run the query '${staticQuery.sql}' }); ^ DrizzleError: Failed to run the query 'ALTER TABLE repositories ADD imported_at integer DEFAULT (unixepoch()) NOT NULL;' at run (/app/dist/scripts/repair-mirrored-repos.js:3752:13) at migrate (/app/dist/scripts/repair-mirrored-repos.js:2726:24) at migrate (/app/dist/scripts/repair-mirrored-repos.js:3985:21) at runDrizzleMigrations (/app/dist/scripts/repair-mirrored-repos.js:18054:14) at /app/dist/scripts/repair-mirrored-repos.js:18078:23 at loadAndEvaluateModule (2:1) 133 | return this.#raw.values(); 134 | } 135 | #rawNoArgs() { 136 | return this.#raw.raw(); 137 | } 138 | return this.#raw.run(internalFieldTuple), createChangesObject(); ^ SQLiteError: Cannot add a column with non-constant default ``` <!-- github-sync-id:4077691811 -->
adam closed this issue 2026-10-05 01:41:31 +02:00
Author
Owner

Was not expecting a drizzle-kit migration to fail.

Was not expecting a drizzle-kit migration to fail. <!-- github-comment-id:4062403781 -->
Author
Owner

@kapdon try the new v3.13.2 once the docker action is done

@kapdon try the new v3.13.2 once the docker action is done <!-- github-comment-id:4062580456 -->
Author
Owner

tested #230 and working.

tested #230 and working. <!-- github-comment-id:4062584379 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/gitea-mirror#101