better deploys
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 2m40s

This commit is contained in:
2025-11-24 17:16:21 -08:00
parent babe5ac40d
commit 5255202d43
5 changed files with 153 additions and 0 deletions

View File

@@ -824,3 +824,13 @@ CREATE TABLE IF NOT EXISTS public.receipt_items (
COMMENT ON TABLE public.receipt_items IS 'Stores individual line items extracted from a user receipt.';
CREATE INDEX IF NOT EXISTS idx_receipt_items_receipt_id ON public.receipt_items(receipt_id);
CREATE INDEX IF NOT EXISTS idx_receipt_items_master_item_id ON public.receipt_items(master_item_id);
-- 54. Store schema metadata to detect changes during deployment.
CREATE TABLE IF NOT EXISTS public.schema_info (
id INT PRIMARY KEY DEFAULT 1,
schema_hash TEXT NOT NULL,
deployed_at TIMESTAMPTZ DEFAULT now() NOT NULL,
CONSTRAINT single_row_check CHECK (id = 1)
);
COMMENT ON TABLE public.schema_info IS 'Stores metadata about the deployed schema, such as a hash of the schema file, to detect changes.';
COMMENT ON COLUMN public.schema_info.schema_hash IS 'A SHA-256 hash of the master_schema_rollup.sql file at the time of deployment.';