mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-31 16:35:23 +00:00
Fix m00001 migration by using targetValues
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
c9b7ebd74d
commit
96ecef8052
@ -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…
x
Reference in New Issue
Block a user