continued migration 0909202591813
This commit is contained in:
parent
f0f85cbfcf
commit
a412a02652
@ -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_plan_uuid UUID REFERENCES %%site_name%%_plans(plan_uuid) ON DELETE CASCADE NOT NULL,
|
||||||
event_recipe_uuid UUID DEFAULT NULL,
|
event_recipe_uuid UUID DEFAULT NULL,
|
||||||
event_receipt_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_description TEXT DEFAULT '' NOT NULL,
|
||||||
event_date_start TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
|
event_date_start TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
|
||||||
event_date_end TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
|
event_date_end TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
CREATE TABLE IF NOT EXISTS %%site_name%%_transactions (
|
CREATE TABLE IF NOT EXISTS %%site_name%%_transactions (
|
||||||
item_uuid UUID PRIMARY KEY REFERENCES %%site_name%%_items(item_uuid) ON DELETE CASCADE,
|
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_created_at TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
|
||||||
transaction_name VARCHAR(255) DEFAULT NULL,
|
transaction_name VARCHAR(255) DEFAULT NULL,
|
||||||
transaction_type VARCHAR(64) DEFAULT '' NOT NULL,
|
transaction_type VARCHAR(64) DEFAULT '' NOT NULL,
|
||||||
|
|||||||
Binary file not shown.
@ -62,7 +62,7 @@ def addTakeOutEvent(site, data, user_id, conn=None):
|
|||||||
)
|
)
|
||||||
|
|
||||||
receipt_item = meal_planner_database.insertReceiptItemsTuple(site, receipt_item.payload(), conn=conn)
|
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(
|
event_payload = database_payloads.PlanEventPayload(
|
||||||
plan_uuid=None,
|
plan_uuid=None,
|
||||||
event_shortname=str(trimmed),
|
event_shortname=str(trimmed),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user