-- Migration 001: growing locations (beds, containers, in-ground plots) CREATE TABLE IF NOT EXISTS locations ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, kind TEXT NOT NULL DEFAULT 'bed' CHECK (kind IN ('bed', 'container', 'ground')), size_note TEXT, sun_note TEXT, notes TEXT, created_at TEXT NOT NULL DEFAULT (datetime('now')), updated_at TEXT NOT NULL DEFAULT (datetime('now')) ); CREATE INDEX IF NOT EXISTS idx_locations_kind ON locations (kind);