continued migration 0909202591813

This commit is contained in:
Jadowyne Ulve 2025-09-09 09:17:48 -05:00
parent f0f85cbfcf
commit a412a02652
4 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS %%site_name%%_plan_events(
event_plan_uuid UUID REFERENCES %%site_name%%_plans(plan_uuid) ON DELETE CASCADE NOT NULL,
event_recipe_uuid UUID DEFAULT NULL,
event_receipt_uuid UUID DEFAULT NULL,
event_shortname VARCHAR(32) NOT NULL,
event_shortname VARCHAR(64) NOT NULL,
event_description TEXT DEFAULT '' NOT NULL,
event_date_start TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
event_date_end TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,

View File

@ -1,5 +1,6 @@
CREATE TABLE IF NOT EXISTS %%site_name%%_transactions (
item_uuid UUID PRIMARY KEY REFERENCES %%site_name%%_items(item_uuid) ON DELETE CASCADE,
transaction_uuid UUID DEFAULT uuid_generate_v4() NOT NULL;
transaction_created_at TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
transaction_name VARCHAR(255) DEFAULT NULL,
transaction_type VARCHAR(64) DEFAULT '' NOT NULL,

View File

@ -62,7 +62,7 @@ def addTakeOutEvent(site, data, user_id, conn=None):
)
receipt_item = meal_planner_database.insertReceiptItemsTuple(site, receipt_item.payload(), conn=conn)
trimmed = data['event_shortname'][:32] # TODO: this shortens the name but i should use a a large character limit
trimmed = data['event_shortname'][:64] # TODO: this shortens the name but i should use a a large character limit
event_payload = database_payloads.PlanEventPayload(
plan_uuid=None,
event_shortname=str(trimmed),