mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-02 03:56:41 +00:00
Merge pull request #809 from balena-io/fix-m00001
Fix m00001 migration by using targetValues
This commit is contained in:
commit
aef4ec53a9
@ -8,13 +8,13 @@ exports.up = function (knex, Promise) {
|
||||
.then((devConfigs) => {
|
||||
const devConfig = devConfigs[0];
|
||||
const targetValues = JSON.parse(devConfig.targetValues);
|
||||
const filteredTargetValues = _.mapKeys( (_v, k) => {
|
||||
const filteredTargetValues = _.mapKeys(targetValues, (_v, k) => {
|
||||
return k.replace(/^(?:RESIN|BALENA)_(.*)/, '$1');
|
||||
});
|
||||
return knex('deviceConfig').update({ targetValues: JSON.stringify(filteredTargetValues) });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
exports.down = function (knex, Promise) {
|
||||
return Promise.reject(new Error('Not Implemented'));
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user