diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-01-03 22:49:58 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-01-03 22:49:58 +0100 |
commit | e8a052fd2c03b399550b6c9be3199d35fdd47f10 (patch) | |
tree | 7b9848c39432f18277665139e7dc8c7a9dd8eb2f /app/src/main/assets | |
parent | da80f3d219c0c05568db0cb9a8910f02cc281d47 (diff) | |
download | io.trygvis.soilmoisture-android-e8a052fd2c03b399550b6c9be3199d35fdd47f10.tar.gz io.trygvis.soilmoisture-android-e8a052fd2c03b399550b6c9be3199d35fdd47f10.tar.bz2 io.trygvis.soilmoisture-android-e8a052fd2c03b399550b6c9be3199d35fdd47f10.tar.xz io.trygvis.soilmoisture-android-e8a052fd2c03b399550b6c9be3199d35fdd47f10.zip |
o Adding a database of BT devices and soil devices, sensors and samples.
Diffstat (limited to 'app/src/main/assets')
3 files changed, 21 insertions, 0 deletions
diff --git a/app/src/main/assets/db/migration/bt/V001.001__baseline.sql b/app/src/main/assets/db/migration/bt/V001.001__baseline.sql new file mode 100644 index 0000000..daf84be --- /dev/null +++ b/app/src/main/assets/db/migration/bt/V001.001__baseline.sql @@ -0,0 +1,8 @@ +-- drop table bt_device; + +create table bt_device( + id integer not null primary key autoincrement, + address char(17) not null unique, + first_seen timestamp not null, + last_seen timestamp not null +); 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 +); |