mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 10:01:55 +00:00
Auto-merge for PR #599 via VersionBot
Remove any leftover knex migrations locks before running migrations
This commit is contained in:
commit
11e8899455
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
|
||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## v7.1.19 - 2018-03-22
|
||||
|
||||
* Remove any leftover knex migrations locks before running migrations #599 [Pablo Carranza Velez]
|
||||
|
||||
## v7.1.18 - 2018-03-19
|
||||
|
||||
* Trim whitespace from the hostname file on the host before passing it as the hostname for containers with host network #595 [Pablo Carranza Velez]
|
||||
|
@ -6,5 +6,8 @@ module.exports = {
|
||||
connection: {
|
||||
filename: './database.sqlite'
|
||||
},
|
||||
useNullAsDefault: true
|
||||
}
|
||||
useNullAsDefault: true,
|
||||
migrations: {
|
||||
directory: './src/migrations'
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "resin-supervisor",
|
||||
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
|
||||
"version": "7.1.18",
|
||||
"version": "7.1.19",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -13,7 +13,10 @@ module.exports = class DB
|
||||
)
|
||||
|
||||
init: =>
|
||||
@knex.migrate.latest(directory: path.join(__dirname, 'migrations'))
|
||||
@knex('knex_migrations_lock').update({ is_locked: 0 })
|
||||
.catch(->) # Knex doesn't return a bluebird promise here so we can't catchReturn :(
|
||||
.then =>
|
||||
@knex.migrate.latest(directory: path.join(__dirname, 'migrations'))
|
||||
|
||||
# Returns a knex object for one of the models (tables)
|
||||
models: (modelName) =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user