add core features (#14)
Build & Deploy Formulation / Build & Push Image (push) Failing after 15s
Build & Deploy Formulation / deploy (push) Skipped

Reviewed-on: #14
Co-authored-by: Nicholas Ward <nicholaspward@outlook.com>
This commit was merged in pull request #14.
This commit is contained in:
2026-08-18 18:22:34 -05:00
committed by nicholas
parent 20e23b100f
commit 2a1e16ed30
125 changed files with 23392 additions and 2082 deletions
+37
View File
@@ -0,0 +1,37 @@
PRAGMA foreign_keys = ON;
CREATE TABLE IF NOT EXISTS inventory_locations (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
position INTEGER NOT NULL,
deleted_at TEXT
);
CREATE TABLE IF NOT EXISTS inventory_counts (
id TEXT PRIMARY KEY,
title TEXT NOT NULL,
counted_at TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'open',
notes TEXT,
created_at TEXT NOT NULL,
deleted_at TEXT
);
CREATE TABLE IF NOT EXISTS inventory_count_items (
count_id TEXT NOT NULL REFERENCES inventory_counts(id) ON DELETE CASCADE,
location_id TEXT REFERENCES inventory_locations(id),
ingredient_id TEXT NOT NULL REFERENCES ingredients(id),
quantity REAL NOT NULL,
unit_id TEXT NOT NULL REFERENCES units(id),
unit_cost REAL,
extended_cost REAL,
PRIMARY KEY (count_id, location_id, ingredient_id)
);
-- Seed baseline standard locations if table is empty
INSERT OR IGNORE INTO inventory_locations (id, name, position, deleted_at) VALUES
('loc_walk_in', 'Walk-in Cooler', 1, NULL),
('loc_dry_storage', 'Dry Storage', 2, NULL),
('loc_freezer', 'Freezer', 3, NULL),
('loc_bar', 'Bar & Service', 4, NULL),
('loc_line', 'Prep Line', 5, NULL);