mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-25 05:19:59 +00:00
Merge pull request #1584 from balena-io/1581-patch-commit-constraint
Prevent inserting null commit during DB migration
This commit is contained in:
commit
001f544c31
@ -9,7 +9,7 @@ export async function up(knex) {
|
|||||||
const currentCommit = await knex('config')
|
const currentCommit = await knex('config')
|
||||||
.where({ key: 'currentCommit' })
|
.where({ key: 'currentCommit' })
|
||||||
.select('value');
|
.select('value');
|
||||||
if (currentCommit[0] != null) {
|
if (currentCommit[0] != null && currentCommit[0].value != null) {
|
||||||
const apps = await knex('app').select(['appId']);
|
const apps = await knex('app').select(['appId']);
|
||||||
|
|
||||||
for (const app of apps) {
|
for (const app of apps) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user