Christina Ying Wang c4f9d72172 Remove dependent devices content in codebase
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>
2023-02-06 19:34:02 -08:00

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');
}