mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-01 15:20:51 +00:00
This includes: - proxyvisor.js - references in docs - references device-state, api-binder, compose modules, API - references in tests The commit also adds a migration to remove the 4 dependent device tables from the DB. Change-type: minor Signed-off-by: Christina Ying Wang <christina@balena.io>
27 lines
764 B
JavaScript
27 lines
764 B
JavaScript
// This migration removes references to dependent devices from
|
|
// the database, as we are no longer pursuing dependent devices.
|
|
export async function up(knex) {
|
|
// Remove dependent key from each image
|
|
if (await knex.schema.hasColumn('image', 'dependent')) {
|
|
await knex.schema.table('image', (t) => {
|
|
return t.dropColumn('dependent');
|
|
});
|
|
}
|
|
|
|
// Delete dependent device/app tables
|
|
const dropTable = async (table) => {
|
|
const exists = await knex.schema.hasTable(table);
|
|
if (exists) {
|
|
await knex.schema.dropTable(table);
|
|
}
|
|
};
|
|
await dropTable('dependentDeviceTarget');
|
|
await dropTable('dependentDevice');
|
|
await dropTable('dependentAppTarget');
|
|
await dropTable('dependentApp');
|
|
}
|
|
|
|
export function down() {
|
|
throw new Error('Not Implemented');
|
|
}
|