File indexing completed on 2024-11-24 05:17:45

0001 -- Your SQL goes here
0002 create table plants (
0003     plant_id integer primary key autoincrement not null,
0004     name text not null,
0005     species text not null,
0006     img_url text,
0007     water_intervall integer not null,
0008     location text,
0009     date_of_birth integer,
0010     parent integer
0011 );
0012 
0013 create table water_history (
0014     plant_id integer not null,
0015     water_date integer not null,
0016     foreign key (plant_id) references plants(plant_id)
0017 );
0018 
0019 create table health_history (
0020     plant_id integer not null,
0021     health_date integer not null,
0022     health integer not null,
0023     foreign key (plant_id) references plants(plant_id)
0024 );