{ "id": "4086d6cd-5c93-4617-a15b-a90331b459a1", "prevId": "83dc14cf-82fb-43fc-8b7d-fd377bf48689", "version": "7", "dialect": "postgresql", "tables": { "public.allergens": { "name": "allergens", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "allergens_name_idx": { "name": "allergens_name_idx", "columns": [ { "expression": "name", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.brands": { "name": "brands", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.contact_messages": { "name": "contact_messages", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.machine_tags": { "name": "machine_tags", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "machine_tags_name_idx": { "name": "machine_tags_name_idx", "columns": [ { "expression": "name", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.machines": { "name": "machines", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "machine_tag_id": { "name": "machine_tag_id", "type": "integer", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "machines_machine_tag_id_machine_tags_id_fk": { "name": "machines_machine_tag_id_machine_tags_id_fk", "tableFrom": "machines", "tableTo": "machine_tags", "columnsFrom": [ "machine_tag_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.menu_item_allergens": { "name": "menu_item_allergens", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "menu_item_id": { "name": "menu_item_id", "type": "integer", "primaryKey": false, "notNull": true }, "allergen_id": { "name": "allergen_id", "type": "integer", "primaryKey": false, "notNull": true } }, "indexes": { "menu_item_allergens_item_allergen_idx": { "name": "menu_item_allergens_item_allergen_idx", "columns": [ { "expression": "menu_item_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "allergen_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "menu_item_allergens_menu_item_id_menu_items_id_fk": { "name": "menu_item_allergens_menu_item_id_menu_items_id_fk", "tableFrom": "menu_item_allergens", "tableTo": "menu_items", "columnsFrom": [ "menu_item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "menu_item_allergens_allergen_id_allergens_id_fk": { "name": "menu_item_allergens_allergen_id_allergens_id_fk", "tableFrom": "menu_item_allergens", "tableTo": "allergens", "columnsFrom": [ "allergen_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.menu_item_options": { "name": "menu_item_options", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "menu_item_id": { "name": "menu_item_id", "type": "integer", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "price_delta_cents": { "name": "price_delta_cents", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 } }, "indexes": {}, "foreignKeys": { "menu_item_options_menu_item_id_menu_items_id_fk": { "name": "menu_item_options_menu_item_id_menu_items_id_fk", "tableFrom": "menu_item_options", "tableTo": "menu_items", "columnsFrom": [ "menu_item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.menu_item_steps": { "name": "menu_item_steps", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "menu_item_id": { "name": "menu_item_id", "type": "integer", "primaryKey": false, "notNull": true }, "sequence": { "name": "sequence", "type": "integer", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "machine_tag_id": { "name": "machine_tag_id", "type": "integer", "primaryKey": false, "notNull": true }, "estimated_duration_seconds": { "name": "estimated_duration_seconds", "type": "integer", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "menu_item_steps_menu_item_id_menu_items_id_fk": { "name": "menu_item_steps_menu_item_id_menu_items_id_fk", "tableFrom": "menu_item_steps", "tableTo": "menu_items", "columnsFrom": [ "menu_item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "menu_item_steps_machine_tag_id_machine_tags_id_fk": { "name": "menu_item_steps_machine_tag_id_machine_tags_id_fk", "tableFrom": "menu_item_steps", "tableTo": "machine_tags", "columnsFrom": [ "machine_tag_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.menu_items": { "name": "menu_items", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "brand_id": { "name": "brand_id", "type": "integer", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "price_cents": { "name": "price_cents", "type": "integer", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "menu_items_brand_id_brands_id_fk": { "name": "menu_items_brand_id_brands_id_fk", "tableFrom": "menu_items", "tableTo": "brands", "columnsFrom": [ "brand_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.order_item_options": { "name": "order_item_options", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "order_item_id": { "name": "order_item_id", "type": "integer", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "price_delta_cents": { "name": "price_delta_cents", "type": "integer", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "order_item_options_order_item_id_order_items_id_fk": { "name": "order_item_options_order_item_id_order_items_id_fk", "tableFrom": "order_item_options", "tableTo": "order_items", "columnsFrom": [ "order_item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.order_item_steps": { "name": "order_item_steps", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "order_item_id": { "name": "order_item_id", "type": "integer", "primaryKey": false, "notNull": true }, "sequence": { "name": "sequence", "type": "integer", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "machine_tag_id": { "name": "machine_tag_id", "type": "integer", "primaryKey": false, "notNull": true }, "estimated_duration_seconds": { "name": "estimated_duration_seconds", "type": "integer", "primaryKey": false, "notNull": true } }, "indexes": {}, "foreignKeys": { "order_item_steps_order_item_id_order_items_id_fk": { "name": "order_item_steps_order_item_id_order_items_id_fk", "tableFrom": "order_item_steps", "tableTo": "order_items", "columnsFrom": [ "order_item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "order_item_steps_machine_tag_id_machine_tags_id_fk": { "name": "order_item_steps_machine_tag_id_machine_tags_id_fk", "tableFrom": "order_item_steps", "tableTo": "machine_tags", "columnsFrom": [ "machine_tag_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.order_items": { "name": "order_items", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "order_id": { "name": "order_id", "type": "integer", "primaryKey": false, "notNull": true }, "menu_item_id": { "name": "menu_item_id", "type": "integer", "primaryKey": false, "notNull": true }, "price_cents": { "name": "price_cents", "type": "integer", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'placed'" }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "order_items_order_id_orders_id_fk": { "name": "order_items_order_id_orders_id_fk", "tableFrom": "order_items", "tableTo": "orders", "columnsFrom": [ "order_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "order_items_menu_item_id_menu_items_id_fk": { "name": "order_items_menu_item_id_menu_items_id_fk", "tableFrom": "order_items", "tableTo": "menu_items", "columnsFrom": [ "menu_item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.orders": { "name": "orders", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "customer_id": { "name": "customer_id", "type": "text", "primaryKey": false, "notNull": false }, "guest_name": { "name": "guest_name", "type": "text", "primaryKey": false, "notNull": false }, "guest_contact": { "name": "guest_contact", "type": "text", "primaryKey": false, "notNull": false }, "guest_access_token": { "name": "guest_access_token", "type": "text", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'placed'" }, "payment_charge_id": { "name": "payment_charge_id", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.preparation_step_instances": { "name": "preparation_step_instances", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "order_item_id": { "name": "order_item_id", "type": "integer", "primaryKey": false, "notNull": true }, "sequence": { "name": "sequence", "type": "integer", "primaryKey": false, "notNull": true }, "machine_tag_id": { "name": "machine_tag_id", "type": "integer", "primaryKey": false, "notNull": true }, "estimated_duration_seconds": { "name": "estimated_duration_seconds", "type": "integer", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'queued'" }, "machine_id": { "name": "machine_id", "type": "integer", "primaryKey": false, "notNull": false }, "started_at": { "name": "started_at", "type": "timestamp", "primaryKey": false, "notNull": false }, "done_at": { "name": "done_at", "type": "timestamp", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": { "preparation_step_instances_order_item_id_order_items_id_fk": { "name": "preparation_step_instances_order_item_id_order_items_id_fk", "tableFrom": "preparation_step_instances", "tableTo": "order_items", "columnsFrom": [ "order_item_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "preparation_step_instances_machine_tag_id_machine_tags_id_fk": { "name": "preparation_step_instances_machine_tag_id_machine_tags_id_fk", "tableFrom": "preparation_step_instances", "tableTo": "machine_tags", "columnsFrom": [ "machine_tag_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "preparation_step_instances_machine_id_machines_id_fk": { "name": "preparation_step_instances_machine_id_machines_id_fk", "tableFrom": "preparation_step_instances", "tableTo": "machines", "columnsFrom": [ "machine_id" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }