diff options
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 +); |