Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Fixed migration
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzlamateen committed Jun 10, 2024
1 parent 9b96653 commit fda22a8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export async function up(knex: Knex): Promise<void> {
if (projects.length > 0) {
const projectSettings = await getConvertedProjectSettings(projects.filter((item) => item.settings))

await knex.from(projectSettingPath).insert(projectSettings)
if (projectSettings.length > 0) {
await knex.from(projectSettingPath).insert(projectSettings)
}
}

await knex.schema.alterTable(projectPath, async (table) => {
Expand Down

0 comments on commit fda22a8

Please sign in to comment.