From e8a052fd2c03b399550b6c9be3199d35fdd47f10 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 3 Jan 2015 22:49:58 +0100 Subject: o Adding a database of BT devices and soil devices, sensors and samples. --- app/src/main/assets/db/migration/sm/V001.001__sm_baseline.sql | 8 ++++++++ app/src/main/assets/db/migration/sm/V001.002__sample.sql | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 app/src/main/assets/db/migration/sm/V001.001__sm_baseline.sql create mode 100644 app/src/main/assets/db/migration/sm/V001.002__sample.sql (limited to 'app/src/main/assets/db/migration/sm') diff --git a/app/src/main/assets/db/migration/sm/V001.001__sm_baseline.sql b/app/src/main/assets/db/migration/sm/V001.001__sm_baseline.sql new file mode 100644 index 0000000..61e8505 --- /dev/null +++ b/app/src/main/assets/db/migration/sm/V001.001__sm_baseline.sql @@ -0,0 +1,8 @@ +-- drop table soil_monitor; + +create table soil_monitor( + id integer not null primary key autoincrement, + bt_device integer not null references bt_device(id), + last_value integer, + warning_level integer not null +); diff --git a/app/src/main/assets/db/migration/sm/V001.002__sample.sql b/app/src/main/assets/db/migration/sm/V001.002__sample.sql new file mode 100644 index 0000000..23fec3b --- /dev/null +++ b/app/src/main/assets/db/migration/sm/V001.002__sample.sql @@ -0,0 +1,5 @@ +create table soil_sample( + id integer not null primary key autoincrement, + soil_monitor integer not null references soil_monitor(id), + value integer +); -- cgit v1.2.3