{ "id": "4dab07de-4804-4198-8d86-01b7c2f9dcaa", "prevId": "406c03e2-8698-493f-ba3e-ee8ca42062fe", "version": "7", "dialect": "postgresql", "tables": { "public.amazon_poll_log": { "name": "amazon_poll_log", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "started_at": { "name": "started_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "finished_at": { "name": "finished_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "orders_found": { "name": "orders_found", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "orders_imported": { "name": "orders_imported", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "error": { "name": "error", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.api_keys": { "name": "api_keys", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "provider": { "name": "provider", "type": "text", "primaryKey": false, "notNull": true }, "label": { "name": "label", "type": "text", "primaryKey": false, "notNull": true }, "value": { "name": "value", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "api_keys_provider_label_unique": { "name": "api_keys_provider_label_unique", "columns": [ { "expression": "provider", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "label", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.sku_mappings": { "name": "sku_mappings", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "amazon_sku": { "name": "amazon_sku", "type": "text", "primaryKey": false, "notNull": true }, "enterprise_sku": { "name": "enterprise_sku", "type": "text", "primaryKey": false, "notNull": true }, "expected_fota_model": { "name": "expected_fota_model", "type": "text", "primaryKey": false, "notNull": true }, "axonaut_product_internal_id": { "name": "axonaut_product_internal_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "sku_mappings_amazon_sku_unique": { "name": "sku_mappings_amazon_sku_unique", "columns": [ { "expression": "amazon_sku", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.orders": { "name": "orders", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "order_ref": { "name": "order_ref", "type": "text", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'new'" }, "axonaut_destocked_at": { "name": "axonaut_destocked_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "axonaut_destock_error": { "name": "axonaut_destock_error", "type": "text", "primaryKey": false, "notNull": false }, "colissimo_tracking_number": { "name": "colissimo_tracking_number", "type": "text", "primaryKey": false, "notNull": false }, "colissimo_label_url": { "name": "colissimo_label_url", "type": "text", "primaryKey": false, "notNull": false }, "colissimo_shipped_at": { "name": "colissimo_shipped_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "colissimo_error": { "name": "colissimo_error", "type": "text", "primaryKey": false, "notNull": false }, "amazon_tracking_confirmed_at": { "name": "amazon_tracking_confirmed_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "amazon_tracking_error": { "name": "amazon_tracking_error", "type": "text", "primaryKey": false, "notNull": false }, "shipping_name": { "name": "shipping_name", "type": "text", "primaryKey": false, "notNull": false }, "shipping_first_name": { "name": "shipping_first_name", "type": "text", "primaryKey": false, "notNull": false }, "shipping_last_name": { "name": "shipping_last_name", "type": "text", "primaryKey": false, "notNull": false }, "shipping_line1": { "name": "shipping_line1", "type": "text", "primaryKey": false, "notNull": false }, "shipping_line2": { "name": "shipping_line2", "type": "text", "primaryKey": false, "notNull": false }, "shipping_line3": { "name": "shipping_line3", "type": "text", "primaryKey": false, "notNull": false }, "shipping_city": { "name": "shipping_city", "type": "text", "primaryKey": false, "notNull": false }, "shipping_zip_code": { "name": "shipping_zip_code", "type": "text", "primaryKey": false, "notNull": false }, "shipping_country_code": { "name": "shipping_country_code", "type": "text", "primaryKey": false, "notNull": false }, "shipping_state": { "name": "shipping_state", "type": "text", "primaryKey": false, "notNull": false }, "shipping_phone": { "name": "shipping_phone", "type": "text", "primaryKey": false, "notNull": false }, "shipping_address_type": { "name": "shipping_address_type", "type": "text", "primaryKey": false, "notNull": false }, "shipping_fetched_at": { "name": "shipping_fetched_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "shipping_fetch_error": { "name": "shipping_fetch_error", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.order_items": { "name": "order_items", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "order_id": { "name": "order_id", "type": "uuid", "primaryKey": false, "notNull": true }, "amazon_sku": { "name": "amazon_sku", "type": "text", "primaryKey": false, "notNull": true }, "amazon_order_item_id": { "name": "amazon_order_item_id", "type": "text", "primaryKey": false, "notNull": false }, "quantity": { "name": "quantity", "type": "integer", "primaryKey": false, "notNull": true }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "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": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.order_imeis": { "name": "order_imeis", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "order_id": { "name": "order_id", "type": "uuid", "primaryKey": false, "notNull": true }, "imei": { "name": "imei", "type": "text", "primaryKey": false, "notNull": true }, "fota_model": { "name": "fota_model", "type": "text", "primaryKey": false, "notNull": false }, "fota_serial": { "name": "fota_serial", "type": "text", "primaryKey": false, "notNull": false }, "fota_current_firmware": { "name": "fota_current_firmware", "type": "text", "primaryKey": false, "notNull": false }, "fota_activity_status": { "name": "fota_activity_status", "type": "integer", "primaryKey": false, "notNull": false }, "fota_seen_at": { "name": "fota_seen_at", "type": "text", "primaryKey": false, "notNull": false }, "fota_company_id": { "name": "fota_company_id", "type": "integer", "primaryKey": false, "notNull": false }, "fota_company_name": { "name": "fota_company_name", "type": "text", "primaryKey": false, "notNull": false }, "fota_group_id": { "name": "fota_group_id", "type": "integer", "primaryKey": false, "notNull": false }, "fota_group_name": { "name": "fota_group_name", "type": "text", "primaryKey": false, "notNull": false }, "fota_lookup_error": { "name": "fota_lookup_error", "type": "text", "primaryKey": false, "notNull": false }, "fota_last_lookup_at": { "name": "fota_last_lookup_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "fota_moved_at": { "name": "fota_moved_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "fota_move_error": { "name": "fota_move_error", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "order_imeis_order_id_imei_unique": { "name": "order_imeis_order_id_imei_unique", "columns": [ { "expression": "order_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "imei", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "order_imeis_order_id_orders_id_fk": { "name": "order_imeis_order_id_orders_id_fk", "tableFrom": "order_imeis", "tableTo": "orders", "columnsFrom": [ "order_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.users": { "name": "users", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "username": { "name": "username", "type": "text", "primaryKey": false, "notNull": true }, "password_hash": { "name": "password_hash", "type": "text", "primaryKey": false, "notNull": true }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "users_username_unique": { "name": "users_username_unique", "nullsNotDistinct": false, "columns": [ "username" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }