Files
asin-check/drizzle/meta/0000_snapshot.json
Victor Noguera f512f1d3d5 Add initial journal file for PostgreSQL dialect version 7
- Created a new JSON file `_journal.json` to track changes and entries.
- Included metadata such as version, dialect, and a sample entry with breakpoints enabled.
2026-05-25 12:33:14 -04:00

2025 lines
53 KiB
JSON

{
"id": "f3a73b1a-820c-4905-b998-55a9b70bc49d",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.analysis_revisions": {
"name": "analysis_revisions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"run_item_id": {
"name": "run_item_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"observation_id": {
"name": "observation_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"method": {
"name": "method",
"type": "analysis_method",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"decision": {
"name": "decision",
"type": "analysis_decision",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"confidence": {
"name": "confidence",
"type": "real",
"primaryKey": false,
"notNull": false
},
"reasoning": {
"name": "reasoning",
"type": "text",
"primaryKey": false,
"notNull": false
},
"analyzed_at": {
"name": "analyzed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"idx_analysis_revisions_run_item_time": {
"name": "idx_analysis_revisions_run_item_time",
"columns": [
{
"expression": "run_item_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "analyzed_at",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_analysis_revisions_decision": {
"name": "idx_analysis_revisions_decision",
"columns": [
{
"expression": "decision",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"analysis_revisions_run_item_id_run_items_id_fk": {
"name": "analysis_revisions_run_item_id_run_items_id_fk",
"tableFrom": "analysis_revisions",
"tableTo": "run_items",
"columnsFrom": [
"run_item_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"analysis_revisions_observation_id_product_observations_id_fk": {
"name": "analysis_revisions_observation_id_product_observations_id_fk",
"tableFrom": "analysis_revisions",
"tableTo": "product_observations",
"columnsFrom": [
"observation_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.analysis_run_stats": {
"name": "analysis_run_stats",
"schema": "",
"columns": {
"run_id": {
"name": "run_id",
"type": "integer",
"primaryKey": true,
"notNull": true
},
"processed_count": {
"name": "processed_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"analyzed_count": {
"name": "analyzed_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"available_count": {
"name": "available_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"fba_count": {
"name": "fba_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"fbm_count": {
"name": "fbm_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"buy_count": {
"name": "buy_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"watch_count": {
"name": "watch_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"skip_count": {
"name": "skip_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
}
},
"indexes": {},
"foreignKeys": {
"analysis_run_stats_run_id_runs_id_fk": {
"name": "analysis_run_stats_run_id_runs_id_fk",
"tableFrom": "analysis_run_stats",
"tableTo": "runs",
"columnsFrom": [
"run_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.category_run_details": {
"name": "category_run_details",
"schema": "",
"columns": {
"run_id": {
"name": "run_id",
"type": "integer",
"primaryKey": true,
"notNull": true
},
"category_id": {
"name": "category_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"category_label": {
"name": "category_label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"checked_asin_count": {
"name": "checked_asin_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"selection_parameters_json": {
"name": "selection_parameters_json",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"category_run_details_run_id_runs_id_fk": {
"name": "category_run_details_run_id_runs_id_fk",
"tableFrom": "category_run_details",
"tableTo": "runs",
"columnsFrom": [
"run_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.product_identifiers": {
"name": "product_identifiers",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"product_asin": {
"name": "product_asin",
"type": "text",
"primaryKey": false,
"notNull": true
},
"identifier_type": {
"name": "identifier_type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"identifier_value": {
"name": "identifier_value",
"type": "text",
"primaryKey": false,
"notNull": true
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": true
},
"confirmed_at": {
"name": "confirmed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"idx_product_identifiers_asin": {
"name": "idx_product_identifiers_asin",
"columns": [
{
"expression": "product_asin",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"product_identifiers_product_asin_products_asin_fk": {
"name": "product_identifiers_product_asin_products_asin_fk",
"tableFrom": "product_identifiers",
"tableTo": "products",
"columnsFrom": [
"product_asin"
],
"columnsTo": [
"asin"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"uq_product_identifier_type_value": {
"name": "uq_product_identifier_type_value",
"nullsNotDistinct": false,
"columns": [
"identifier_type",
"identifier_value"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.product_observations": {
"name": "product_observations",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"product_asin": {
"name": "product_asin",
"type": "text",
"primaryKey": false,
"notNull": true
},
"run_id": {
"name": "run_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": true
},
"marketplace": {
"name": "marketplace",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'US'"
},
"current_price": {
"name": "current_price",
"type": "real",
"primaryKey": false,
"notNull": false
},
"avg_price_90d": {
"name": "avg_price_90d",
"type": "real",
"primaryKey": false,
"notNull": false
},
"sales_rank": {
"name": "sales_rank",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"sales_rank_avg_90d": {
"name": "sales_rank_avg_90d",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"monthly_sold": {
"name": "monthly_sold",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"rank_drops_30d": {
"name": "rank_drops_30d",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"rank_drops_90d": {
"name": "rank_drops_90d",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"seller_count": {
"name": "seller_count",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"amazon_is_seller": {
"name": "amazon_is_seller",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"amazon_buybox_share_pct_90d": {
"name": "amazon_buybox_share_pct_90d",
"type": "real",
"primaryKey": false,
"notNull": false
},
"fba_fee": {
"name": "fba_fee",
"type": "real",
"primaryKey": false,
"notNull": false
},
"fbm_fee": {
"name": "fbm_fee",
"type": "real",
"primaryKey": false,
"notNull": false
},
"referral_percent": {
"name": "referral_percent",
"type": "real",
"primaryKey": false,
"notNull": false
},
"can_sell": {
"name": "can_sell",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"sellability_status": {
"name": "sellability_status",
"type": "text",
"primaryKey": false,
"notNull": false
},
"sellability_reason": {
"name": "sellability_reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"raw_product_json": {
"name": "raw_product_json",
"type": "text",
"primaryKey": false,
"notNull": false
},
"fetched_at": {
"name": "fetched_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"idx_product_observations_product_time": {
"name": "idx_product_observations_product_time",
"columns": [
{
"expression": "product_asin",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "fetched_at",
"isExpression": false,
"asc": false,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_product_observations_run_id": {
"name": "idx_product_observations_run_id",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_product_observations_sellability": {
"name": "idx_product_observations_sellability",
"columns": [
{
"expression": "sellability_status",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"product_observations_product_asin_products_asin_fk": {
"name": "product_observations_product_asin_products_asin_fk",
"tableFrom": "product_observations",
"tableTo": "products",
"columnsFrom": [
"product_asin"
],
"columnsTo": [
"asin"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"product_observations_run_id_runs_id_fk": {
"name": "product_observations_run_id_runs_id_fk",
"tableFrom": "product_observations",
"tableTo": "runs",
"columnsFrom": [
"run_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.products": {
"name": "products",
"schema": "",
"columns": {
"asin": {
"name": "asin",
"type": "text",
"primaryKey": true,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"brand": {
"name": "brand",
"type": "text",
"primaryKey": false,
"notNull": false
},
"category": {
"name": "category",
"type": "text",
"primaryKey": false,
"notNull": false
},
"metadata_fetched_at": {
"name": "metadata_fetched_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"first_seen_at": {
"name": "first_seen_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"last_seen_at": {
"name": "last_seen_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"idx_products_name": {
"name": "idx_products_name",
"columns": [
{
"expression": "name",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_products_last_seen_at": {
"name": "idx_products_last_seen_at",
"columns": [
{
"expression": "last_seen_at",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {
"ck_products_asin": {
"name": "ck_products_asin",
"value": "\"products\".\"asin\" ~ '^[A-Z0-9]{10}$'"
}
},
"isRLSEnabled": false
},
"public.run_items": {
"name": "run_items",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"run_id": {
"name": "run_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"product_asin": {
"name": "product_asin",
"type": "text",
"primaryKey": false,
"notNull": false
},
"source_inventory_item_id": {
"name": "source_inventory_item_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"ordinal": {
"name": "ordinal",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"source_row": {
"name": "source_row",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'completed'"
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"idx_run_items_run_id": {
"name": "idx_run_items_run_id",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_run_items_product_asin": {
"name": "idx_run_items_product_asin",
"columns": [
{
"expression": "product_asin",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"run_items_run_id_runs_id_fk": {
"name": "run_items_run_id_runs_id_fk",
"tableFrom": "run_items",
"tableTo": "runs",
"columnsFrom": [
"run_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"run_items_product_asin_products_asin_fk": {
"name": "run_items_product_asin_products_asin_fk",
"tableFrom": "run_items",
"tableTo": "products",
"columnsFrom": [
"product_asin"
],
"columnsTo": [
"asin"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"run_items_source_inventory_item_id_stalker_inventory_items_id_fk": {
"name": "run_items_source_inventory_item_id_stalker_inventory_items_id_fk",
"tableFrom": "run_items",
"tableTo": "stalker_inventory_items",
"columnsFrom": [
"source_inventory_item_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.runs": {
"name": "runs",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"type": {
"name": "type",
"type": "run_type",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"parent_run_id": {
"name": "parent_run_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"input_file": {
"name": "input_file",
"type": "text",
"primaryKey": false,
"notNull": false
},
"output_file": {
"name": "output_file",
"type": "text",
"primaryKey": false,
"notNull": false
},
"status": {
"name": "status",
"type": "run_status",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'running'"
},
"error_message": {
"name": "error_message",
"type": "text",
"primaryKey": false,
"notNull": false
},
"started_at": {
"name": "started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"completed_at": {
"name": "completed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"idx_runs_started_at": {
"name": "idx_runs_started_at",
"columns": [
{
"expression": "started_at",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_runs_type": {
"name": "idx_runs_type",
"columns": [
{
"expression": "type",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_runs_status": {
"name": "idx_runs_status",
"columns": [
{
"expression": "status",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_runs_parent_run_id": {
"name": "idx_runs_parent_run_id",
"columns": [
{
"expression": "parent_run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"runs_parent_run_id_runs_id_fk": {
"name": "runs_parent_run_id_runs_id_fk",
"tableFrom": "runs",
"tableTo": "runs",
"columnsFrom": [
"parent_run_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.sellers": {
"name": "sellers",
"schema": "",
"columns": {
"seller_id": {
"name": "seller_id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"seller_name": {
"name": "seller_name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"rating": {
"name": "rating",
"type": "real",
"primaryKey": false,
"notNull": false
},
"rating_count": {
"name": "rating_count",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"storefront_asin_total": {
"name": "storefront_asin_total",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"persisted_inventory_sample_count": {
"name": "persisted_inventory_sample_count",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"last_updated_at": {
"name": "last_updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"raw_seller_json": {
"name": "raw_seller_json",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.sourcing_inputs": {
"name": "sourcing_inputs",
"schema": "",
"columns": {
"run_item_id": {
"name": "run_item_id",
"type": "integer",
"primaryKey": true,
"notNull": true
},
"supplied_name": {
"name": "supplied_name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"supplied_brand": {
"name": "supplied_brand",
"type": "text",
"primaryKey": false,
"notNull": false
},
"supplied_category": {
"name": "supplied_category",
"type": "text",
"primaryKey": false,
"notNull": false
},
"unit_cost": {
"name": "unit_cost",
"type": "real",
"primaryKey": false,
"notNull": false
},
"avg_price_90d_sheet": {
"name": "avg_price_90d_sheet",
"type": "real",
"primaryKey": false,
"notNull": false
},
"selling_price_sheet": {
"name": "selling_price_sheet",
"type": "real",
"primaryKey": false,
"notNull": false
},
"fba_net_sheet": {
"name": "fba_net_sheet",
"type": "real",
"primaryKey": false,
"notNull": false
},
"gross_profit_dollar": {
"name": "gross_profit_dollar",
"type": "real",
"primaryKey": false,
"notNull": false
},
"gross_profit_pct": {
"name": "gross_profit_pct",
"type": "real",
"primaryKey": false,
"notNull": false
},
"net_profit_sheet": {
"name": "net_profit_sheet",
"type": "real",
"primaryKey": false,
"notNull": false
},
"roi_sheet": {
"name": "roi_sheet",
"type": "real",
"primaryKey": false,
"notNull": false
},
"moq": {
"name": "moq",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"moq_cost": {
"name": "moq_cost",
"type": "real",
"primaryKey": false,
"notNull": false
},
"qty_available": {
"name": "qty_available",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"supplier": {
"name": "supplier",
"type": "text",
"primaryKey": false,
"notNull": false
},
"source_url": {
"name": "source_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"asin_link": {
"name": "asin_link",
"type": "text",
"primaryKey": false,
"notNull": false
},
"promo_coupon_code": {
"name": "promo_coupon_code",
"type": "text",
"primaryKey": false,
"notNull": false
},
"notes": {
"name": "notes",
"type": "text",
"primaryKey": false,
"notNull": false
},
"lead_date": {
"name": "lead_date",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"sourcing_inputs_run_item_id_run_items_id_fk": {
"name": "sourcing_inputs_run_item_id_run_items_id_fk",
"tableFrom": "sourcing_inputs",
"tableTo": "run_items",
"columnsFrom": [
"run_item_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.stalker_inventory_items": {
"name": "stalker_inventory_items",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"run_id": {
"name": "run_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"seller_id": {
"name": "seller_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"product_asin": {
"name": "product_asin",
"type": "text",
"primaryKey": false,
"notNull": true
},
"observation_id": {
"name": "observation_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"last_seen_at": {
"name": "last_seen_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
},
"raw_inventory_json": {
"name": "raw_inventory_json",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"idx_stalker_inventory_seller_id": {
"name": "idx_stalker_inventory_seller_id",
"columns": [
{
"expression": "seller_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_stalker_inventory_product_asin": {
"name": "idx_stalker_inventory_product_asin",
"columns": [
{
"expression": "product_asin",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"stalker_inventory_items_run_id_runs_id_fk": {
"name": "stalker_inventory_items_run_id_runs_id_fk",
"tableFrom": "stalker_inventory_items",
"tableTo": "runs",
"columnsFrom": [
"run_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"stalker_inventory_items_seller_id_sellers_seller_id_fk": {
"name": "stalker_inventory_items_seller_id_sellers_seller_id_fk",
"tableFrom": "stalker_inventory_items",
"tableTo": "sellers",
"columnsFrom": [
"seller_id"
],
"columnsTo": [
"seller_id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"stalker_inventory_items_product_asin_products_asin_fk": {
"name": "stalker_inventory_items_product_asin_products_asin_fk",
"tableFrom": "stalker_inventory_items",
"tableTo": "products",
"columnsFrom": [
"product_asin"
],
"columnsTo": [
"asin"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"stalker_inventory_items_observation_id_product_observations_id_fk": {
"name": "stalker_inventory_items_observation_id_product_observations_id_fk",
"tableFrom": "stalker_inventory_items",
"tableTo": "product_observations",
"columnsFrom": [
"observation_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"uq_stalker_inventory_items_run_seller_asin": {
"name": "uq_stalker_inventory_items_run_seller_asin",
"nullsNotDistinct": false,
"columns": [
"run_id",
"seller_id",
"product_asin"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.stalker_run_details": {
"name": "stalker_run_details",
"schema": "",
"columns": {
"run_id": {
"name": "run_id",
"type": "integer",
"primaryKey": true,
"notNull": true
},
"requested_asins": {
"name": "requested_asins",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"skipped_asins": {
"name": "skipped_asins",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"scanned_asins": {
"name": "scanned_asins",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"source_asins_with_matches": {
"name": "source_asins_with_matches",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"candidate_sellers": {
"name": "candidate_sellers",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"qualifying_sellers": {
"name": "qualifying_sellers",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"matched_sellers": {
"name": "matched_sellers",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"seller_metadata_requests": {
"name": "seller_metadata_requests",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"seller_storefront_requests": {
"name": "seller_storefront_requests",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"inventory_sellability_checked_asins": {
"name": "inventory_sellability_checked_asins",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"inventory_sellability_available_asins": {
"name": "inventory_sellability_available_asins",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"inventory_sellability_excluded_asins": {
"name": "inventory_sellability_excluded_asins",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"persisted_inventory_asins": {
"name": "persisted_inventory_asins",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
}
},
"indexes": {},
"foreignKeys": {
"stalker_run_details_run_id_runs_id_fk": {
"name": "stalker_run_details_run_id_runs_id_fk",
"tableFrom": "stalker_run_details",
"tableTo": "runs",
"columnsFrom": [
"run_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.stalker_scan_sellers": {
"name": "stalker_scan_sellers",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"scan_id": {
"name": "scan_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"seller_id": {
"name": "seller_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"offer_price": {
"name": "offer_price",
"type": "real",
"primaryKey": false,
"notNull": false
},
"condition": {
"name": "condition",
"type": "text",
"primaryKey": false,
"notNull": false
},
"is_fba": {
"name": "is_fba",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"stock": {
"name": "stock",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"seller_rating": {
"name": "seller_rating",
"type": "real",
"primaryKey": false,
"notNull": false
},
"seller_rating_count": {
"name": "seller_rating_count",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"raw_offer_json": {
"name": "raw_offer_json",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"stalker_scan_sellers_scan_id_stalker_scans_id_fk": {
"name": "stalker_scan_sellers_scan_id_stalker_scans_id_fk",
"tableFrom": "stalker_scan_sellers",
"tableTo": "stalker_scans",
"columnsFrom": [
"scan_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"stalker_scan_sellers_seller_id_sellers_seller_id_fk": {
"name": "stalker_scan_sellers_seller_id_sellers_seller_id_fk",
"tableFrom": "stalker_scan_sellers",
"tableTo": "sellers",
"columnsFrom": [
"seller_id"
],
"columnsTo": [
"seller_id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"uq_stalker_scan_sellers_scan_seller": {
"name": "uq_stalker_scan_sellers_scan_seller",
"nullsNotDistinct": false,
"columns": [
"scan_id",
"seller_id"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.stalker_scans": {
"name": "stalker_scans",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"run_id": {
"name": "run_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"source_product_asin": {
"name": "source_product_asin",
"type": "text",
"primaryKey": false,
"notNull": true
},
"observation_id": {
"name": "observation_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"offer_count": {
"name": "offer_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"candidate_seller_count": {
"name": "candidate_seller_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"matched_seller_count": {
"name": "matched_seller_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"fetched_at": {
"name": "fetched_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"idx_stalker_scans_run_id": {
"name": "idx_stalker_scans_run_id",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
},
"idx_stalker_scans_source_asin": {
"name": "idx_stalker_scans_source_asin",
"columns": [
{
"expression": "source_product_asin",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"stalker_scans_run_id_runs_id_fk": {
"name": "stalker_scans_run_id_runs_id_fk",
"tableFrom": "stalker_scans",
"tableTo": "runs",
"columnsFrom": [
"run_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"stalker_scans_source_product_asin_products_asin_fk": {
"name": "stalker_scans_source_product_asin_products_asin_fk",
"tableFrom": "stalker_scans",
"tableTo": "products",
"columnsFrom": [
"source_product_asin"
],
"columnsTo": [
"asin"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"stalker_scans_observation_id_product_observations_id_fk": {
"name": "stalker_scans_observation_id_product_observations_id_fk",
"tableFrom": "stalker_scans",
"tableTo": "product_observations",
"columnsFrom": [
"observation_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"uq_stalker_scans_run_source_product": {
"name": "uq_stalker_scans_run_source_product",
"nullsNotDistinct": false,
"columns": [
"run_id",
"source_product_asin"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.supplier_scores": {
"name": "supplier_scores",
"schema": "",
"columns": {
"revision_id": {
"name": "revision_id",
"type": "integer",
"primaryKey": true,
"notNull": true
},
"score": {
"name": "score",
"type": "real",
"primaryKey": false,
"notNull": false
},
"sale_price": {
"name": "sale_price",
"type": "real",
"primaryKey": false,
"notNull": false
},
"fba_fee": {
"name": "fba_fee",
"type": "real",
"primaryKey": false,
"notNull": false
},
"profit": {
"name": "profit",
"type": "real",
"primaryKey": false,
"notNull": false
},
"margin": {
"name": "margin",
"type": "real",
"primaryKey": false,
"notNull": false
},
"roi": {
"name": "roi",
"type": "real",
"primaryKey": false,
"notNull": false
},
"reason": {
"name": "reason",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"supplier_scores_revision_id_analysis_revisions_id_fk": {
"name": "supplier_scores_revision_id_analysis_revisions_id_fk",
"tableFrom": "supplier_scores",
"tableTo": "analysis_revisions",
"columnsFrom": [
"revision_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.upc_resolution_candidates": {
"name": "upc_resolution_candidates",
"schema": "",
"columns": {
"run_item_id": {
"name": "run_item_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"product_asin": {
"name": "product_asin",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {
"idx_upc_candidates_product_asin": {
"name": "idx_upc_candidates_product_asin",
"columns": [
{
"expression": "product_asin",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"upc_resolution_candidates_run_item_id_upc_resolutions_run_item_id_fk": {
"name": "upc_resolution_candidates_run_item_id_upc_resolutions_run_item_id_fk",
"tableFrom": "upc_resolution_candidates",
"tableTo": "upc_resolutions",
"columnsFrom": [
"run_item_id"
],
"columnsTo": [
"run_item_id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"upc_resolution_candidates_product_asin_products_asin_fk": {
"name": "upc_resolution_candidates_product_asin_products_asin_fk",
"tableFrom": "upc_resolution_candidates",
"tableTo": "products",
"columnsFrom": [
"product_asin"
],
"columnsTo": [
"asin"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"upc_resolution_candidates_run_item_id_product_asin_pk": {
"name": "upc_resolution_candidates_run_item_id_product_asin_pk",
"columns": [
"run_item_id",
"product_asin"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.upc_resolutions": {
"name": "upc_resolutions",
"schema": "",
"columns": {
"run_item_id": {
"name": "run_item_id",
"type": "integer",
"primaryKey": true,
"notNull": true
},
"requested_upc": {
"name": "requested_upc",
"type": "text",
"primaryKey": false,
"notNull": true
},
"normalized_upc": {
"name": "normalized_upc",
"type": "text",
"primaryKey": false,
"notNull": true
},
"provider": {
"name": "provider",
"type": "text",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true
},
"reason": {
"name": "reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"resolved_product_asin": {
"name": "resolved_product_asin",
"type": "text",
"primaryKey": false,
"notNull": false
},
"resolved_at": {
"name": "resolved_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"idx_upc_resolutions_normalized_upc": {
"name": "idx_upc_resolutions_normalized_upc",
"columns": [
{
"expression": "normalized_upc",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"upc_resolutions_run_item_id_run_items_id_fk": {
"name": "upc_resolutions_run_item_id_run_items_id_fk",
"tableFrom": "upc_resolutions",
"tableTo": "run_items",
"columnsFrom": [
"run_item_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"upc_resolutions_resolved_product_asin_products_asin_fk": {
"name": "upc_resolutions_resolved_product_asin_products_asin_fk",
"tableFrom": "upc_resolutions",
"tableTo": "products",
"columnsFrom": [
"resolved_product_asin"
],
"columnsTo": [
"asin"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {
"public.analysis_decision": {
"name": "analysis_decision",
"schema": "public",
"values": [
"FBA",
"FBM",
"BUY",
"WATCH",
"SKIP"
]
},
"public.analysis_method": {
"name": "analysis_method",
"schema": "public",
"values": [
"llm",
"supplier_scoring"
]
},
"public.run_status": {
"name": "run_status",
"schema": "public",
"values": [
"running",
"ok",
"empty",
"failed",
"completed"
]
},
"public.run_type": {
"name": "run_type",
"schema": "public",
"values": [
"lead_analysis",
"category_analysis",
"supplier_upc",
"stalker",
"stalker_analysis"
]
}
},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}