Skip to content

Commit

Permalink
LF-4621 Update sensor status variables and add down drop function
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan-Brain committed Jan 10, 2025
1 parent 6dfa219 commit b41498a
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ export const up = async function (knex) {
table.string('key').notNullable();
});

await knex('sensor_status').insert([
{ key: 'ONLINE_OK' },
{ key: 'ONLINE_WARNING' },
{ key: 'NOT_CONNECTED' },
]);
await knex('sensor_status').insert([{ key: 'ONLINE' }, { key: 'OFFLINE' }]);

// Create sensor table
await knex.schema.createTable('sensor', (table) => {
Expand Down Expand Up @@ -162,6 +158,7 @@ export const down = async function (knex) {
await knex.schema.dropTable('sensor_reading_mode');
await knex.schema.dropTable('sensor_reading_type');
await knex.schema.dropTable('sensor');
await knex.schema.dropTable('sensor_status');
await knex.schema.dropTable('sensor_array');
await knex.schema.dropTable('sensor_manufacturer');
await knex.schema.dropTable('farm_inbound_integration');
Expand Down

0 comments on commit b41498a

Please sign in to comment.