mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 16:44:07 -08:00
Fixing error with new installations
This commit is contained in:
parent
81780cfe19
commit
0e4827ce36
|
@ -186,7 +186,13 @@ export async function init(): Promise<IDatabaseCollections> {
|
||||||
// This specific migration changes database metadata.
|
// This specific migration changes database metadata.
|
||||||
// A field is now nullable. We need to reconnect so that
|
// A field is now nullable. We need to reconnect so that
|
||||||
// n8n knows it has changed. Happens only on sqlite.
|
// n8n knows it has changed. Happens only on sqlite.
|
||||||
const migrations = await connection.query(`SELECT id FROM ${entityPrefix}migrations where name = "MakeStoppedAtNullable1607431743769"`);
|
let migrations = [];
|
||||||
|
try {
|
||||||
|
migrations = await connection.query(`SELECT id FROM ${entityPrefix}migrations where name = "MakeStoppedAtNullable1607431743769"`);
|
||||||
|
} catch(error) {
|
||||||
|
// Migration table does not exist yet - it will be created after migrations run for the first time.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// If you remove this call, remember to turn back on the
|
// If you remove this call, remember to turn back on the
|
||||||
// setting to run migrations automatically above.
|
// setting to run migrations automatically above.
|
||||||
|
|
Loading…
Reference in a new issue