
CREATE TABLE "events" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"created_at"	DATETIME,
	"updated_at"	DATETIME,
	"what"	TEXT,
	"who"	TEXT,
	"when"	DATETIME,
	"why"	TEXT,
	"resource_id"	TEXT,
	"resource_type"	TEXT
);

CREATE TABLE "garden_tasks" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"created_at"	DATETIME,
	"updated_at"	DATETIME,
	"description"	TEXT,
	"name"	TEXT,
	"start_date"	DATETIME,
	"garden_id"	INTEGER,
	"plantation_id"	INTEGER
);

CREATE TABLE "gardens" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"created_at"	DATETIME,
	"updated_at"	DATETIME,
	"name"	TEXT,
	"picture"	TEXT
);

CREATE TABLE "plant_tasks" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"created_at"	DATETIME,
	"updated_at"	DATETIME,
	"description"	TEXT,
	"name"	TEXT,
	"start_date"	DATETIME,
	"plant_id"	INTEGER
);

CREATE TABLE "plantations" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"created_at"	DATETIME,
	"updated_at"	DATETIME,
	"name"	TEXT,
	"planted_at"	DATETIME,
	"plant_id"	INTEGER,
	"garden_id"	INTEGER
);

CREATE TABLE "plants" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"created_at"	DATETIME,
	"updated_at"	DATETIME,
	"data"	JSON,
	"description"	TEXT,
	"exposition"	TEXT,
	"harvested"	REAL,
	"name"	TEXT,
	"perennial"	INTEGER,
	"planting_schema"	JSON,
	"reference"	TEXT,
	"size"	INTEGER
);

CREATE TABLE "seed_programs" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"created_at"	DATETIME,
	"updated_at"	DATETIME,
	"contact"	TEXT,
	"description"	TEXT,
	"name"	TEXT,
	"plant_id"	INTEGER
);

CREATE TABLE "users" (
	"id"	INTEGER PRIMARY KEY AUTOINCREMENT,
	"created_at"	DATETIME,
	"updated_at"	DATETIME,
	"name"	TEXT
);
