For continuous optimization we need to attribute slow/failed decodes to the right cause. query_logs.timings jsonb is now a structured decode-meta blob, not just stage timings: - wmi: first 3 chars of VIN (per-brand aggregation) - result_kind: vehicle / pcat_candidates / emex_candidates / unknown / aborted - cache_source: db_hit / redis_positive / redis_negative / lock_wait / miss - candidate_pick: pcat / emex / none (when user picks from candidate modal) - pcat_car_count, emex_candidate_count (cardinality, drives candidate-modal rate) - pl24_circuit_open, pl24_skipped (CB state at request time) - vin_api_used, vin_api timing (NHTSA fallback frequency) Migration 0003 adds a query_log_insights VIEW that flattens these keys into typed columns, so ad-hoc SQL doesn't need json operators. New meta keys appear automatically as NULL; the VIEW stays stable. docs/analytics-queries.sql has 8 starter queries: cache hit ratio, per-source latency, slowest WMIs, stage breakdowns, CB/abort frequency, candidate-modal rate, top failing VINs, dedup effectiveness. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5173 lines
133 KiB
JSON
5173 lines
133 KiB
JSON
{
|
|
"id": "b797d2fd-854c-43bd-9924-cd1ca469a239",
|
|
"prevId": "03894be0-b7bc-4a6a-940d-37b9f4a71b27",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.accounts": {
|
|
"name": "accounts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"account_id": {
|
|
"name": "account_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider_id": {
|
|
"name": "provider_id",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"access_token": {
|
|
"name": "access_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"refresh_token": {
|
|
"name": "refresh_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"access_token_expires_at": {
|
|
"name": "access_token_expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"refresh_token_expires_at": {
|
|
"name": "refresh_token_expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"id_token": {
|
|
"name": "id_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"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": {
|
|
"accounts_user_id_idx": {
|
|
"name": "accounts_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"accounts_user_id_users_id_fk": {
|
|
"name": "accounts_user_id_users_id_fk",
|
|
"tableFrom": "accounts",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.brands": {
|
|
"name": "brands",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"logo_url": {
|
|
"name": "logo_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_active": {
|
|
"name": "is_active",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 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": {
|
|
"brands_slug_idx": {
|
|
"name": "brands_slug_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "slug",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.catalog_vehicles": {
|
|
"name": "catalog_vehicles",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pl24'"
|
|
},
|
|
"service_name": {
|
|
"name": "service_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brand_name": {
|
|
"name": "brand_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brand_id": {
|
|
"name": "brand_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model": {
|
|
"name": "model",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"year": {
|
|
"name": "year",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"engine": {
|
|
"name": "engine",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"body_type": {
|
|
"name": "body_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"transmission": {
|
|
"name": "transmission",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"market": {
|
|
"name": "market",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"service_vehicle_id": {
|
|
"name": "service_vehicle_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"catalog_path": {
|
|
"name": "catalog_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"architecture": {
|
|
"name": "architecture",
|
|
"type": "varchar(30)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"metadata": {
|
|
"name": "metadata",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"categories_fetched": {
|
|
"name": "categories_fetched",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 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": {
|
|
"catalog_vehicles_source_svc_vid_idx": {
|
|
"name": "catalog_vehicles_source_svc_vid_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "source",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "service_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "service_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"catalog_vehicles_brand_name_idx": {
|
|
"name": "catalog_vehicles_brand_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "brand_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"catalog_vehicles_service_name_idx": {
|
|
"name": "catalog_vehicles_service_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "service_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"catalog_vehicles_brand_id_brands_id_fk": {
|
|
"name": "catalog_vehicles_brand_id_brands_id_fk",
|
|
"tableFrom": "catalog_vehicles",
|
|
"tableTo": "brands",
|
|
"columnsFrom": [
|
|
"brand_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.categories": {
|
|
"name": "categories",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"vehicle_id": {
|
|
"name": "vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"catalog_vehicle_id": {
|
|
"name": "catalog_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name_original": {
|
|
"name": "name_original",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"parent_id": {
|
|
"name": "parent_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"external_id": {
|
|
"name": "external_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"link_path": {
|
|
"name": "link_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"link_wid": {
|
|
"name": "link_wid",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"unavailable": {
|
|
"name": "unavailable",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pl24'"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"categories_vehicle_id_idx": {
|
|
"name": "categories_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"categories_catalog_vehicle_id_idx": {
|
|
"name": "categories_catalog_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"categories_parent_id_idx": {
|
|
"name": "categories_parent_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "parent_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"categories_vehicle_name_source_idx": {
|
|
"name": "categories_vehicle_name_source_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "catalog_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "source",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"categories_vehicle_id_vehicles_id_fk": {
|
|
"name": "categories_vehicle_id_vehicles_id_fk",
|
|
"tableFrom": "categories",
|
|
"tableTo": "vehicles",
|
|
"columnsFrom": [
|
|
"vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"categories_catalog_vehicle_id_catalog_vehicles_id_fk": {
|
|
"name": "categories_catalog_vehicle_id_catalog_vehicles_id_fk",
|
|
"tableFrom": "categories",
|
|
"tableTo": "catalog_vehicles",
|
|
"columnsFrom": [
|
|
"catalog_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.changelog_entries": {
|
|
"name": "changelog_entries",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"change_type": {
|
|
"name": "change_type",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'feature'"
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"published_at": {
|
|
"name": "published_at",
|
|
"type": "timestamp with time zone",
|
|
"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": {
|
|
"changelog_entries_published_at_idx": {
|
|
"name": "changelog_entries_published_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "published_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_category_translations": {
|
|
"name": "emex_category_translations",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"original_name": {
|
|
"name": "original_name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"translated_name": {
|
|
"name": "translated_name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_manual": {
|
|
"name": "is_manual",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 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": {
|
|
"emex_translations_original_name_idx": {
|
|
"name": "emex_translations_original_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "original_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.oem_code_copies": {
|
|
"name": "oem_code_copies",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"oem_code": {
|
|
"name": "oem_code",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"part_id": {
|
|
"name": "part_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vehicle_id": {
|
|
"name": "vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"category_id": {
|
|
"name": "category_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"oem_code_copies_user_id_created_at_idx": {
|
|
"name": "oem_code_copies_user_id_created_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"oem_code_copies_oem_code_idx": {
|
|
"name": "oem_code_copies_oem_code_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "oem_code",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"oem_code_copies_created_at_idx": {
|
|
"name": "oem_code_copies_created_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"oem_code_copies_user_id_users_id_fk": {
|
|
"name": "oem_code_copies_user_id_users_id_fk",
|
|
"tableFrom": "oem_code_copies",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.parts": {
|
|
"name": "parts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"vehicle_id": {
|
|
"name": "vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"catalog_vehicle_id": {
|
|
"name": "catalog_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"category_id": {
|
|
"name": "category_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"oem_code": {
|
|
"name": "oem_code",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name_original": {
|
|
"name": "name_original",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"quantity": {
|
|
"name": "quantity",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"position": {
|
|
"name": "position",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"hotspot_index": {
|
|
"name": "hotspot_index",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"unavailable": {
|
|
"name": "unavailable",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"remark": {
|
|
"name": "remark",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_codes": {
|
|
"name": "model_codes",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"presel": {
|
|
"name": "presel",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"price": {
|
|
"name": "price",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"currency": {
|
|
"name": "currency",
|
|
"type": "varchar(3)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pl24'"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"parts_vehicle_id_idx": {
|
|
"name": "parts_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"parts_catalog_vehicle_id_idx": {
|
|
"name": "parts_catalog_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"parts_category_id_idx": {
|
|
"name": "parts_category_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "category_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"parts_oem_code_idx": {
|
|
"name": "parts_oem_code_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "oem_code",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"parts_vehicle_id_vehicles_id_fk": {
|
|
"name": "parts_vehicle_id_vehicles_id_fk",
|
|
"tableFrom": "parts",
|
|
"tableTo": "vehicles",
|
|
"columnsFrom": [
|
|
"vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"parts_catalog_vehicle_id_catalog_vehicles_id_fk": {
|
|
"name": "parts_catalog_vehicle_id_catalog_vehicles_id_fk",
|
|
"tableFrom": "parts",
|
|
"tableTo": "catalog_vehicles",
|
|
"columnsFrom": [
|
|
"catalog_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"parts_category_id_categories_id_fk": {
|
|
"name": "parts_category_id_categories_id_fk",
|
|
"tableFrom": "parts",
|
|
"tableTo": "categories",
|
|
"columnsFrom": [
|
|
"category_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.password_reset_tokens": {
|
|
"name": "password_reset_tokens",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"used_at": {
|
|
"name": "used_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"password_reset_tokens_token_idx": {
|
|
"name": "password_reset_tokens_token_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "token",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"password_reset_tokens_user_id_users_id_fk": {
|
|
"name": "password_reset_tokens_user_id_users_id_fk",
|
|
"tableFrom": "password_reset_tokens",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.payments": {
|
|
"name": "payments",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"subscription_id": {
|
|
"name": "subscription_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"amount": {
|
|
"name": "amount",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"currency": {
|
|
"name": "currency",
|
|
"type": "varchar(3)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'TRY'"
|
|
},
|
|
"method": {
|
|
"name": "method",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pending'"
|
|
},
|
|
"iyzico_payment_id": {
|
|
"name": "iyzico_payment_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"eft_receipt_url": {
|
|
"name": "eft_receipt_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"admin_note": {
|
|
"name": "admin_note",
|
|
"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": {
|
|
"payments_user_id_idx": {
|
|
"name": "payments_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"payments_status_idx": {
|
|
"name": "payments_status_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"payments_user_id_users_id_fk": {
|
|
"name": "payments_user_id_users_id_fk",
|
|
"tableFrom": "payments",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"payments_subscription_id_user_subscriptions_id_fk": {
|
|
"name": "payments_subscription_id_user_subscriptions_id_fk",
|
|
"tableFrom": "payments",
|
|
"tableTo": "user_subscriptions",
|
|
"columnsFrom": [
|
|
"subscription_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plans": {
|
|
"name": "plans",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brand_count": {
|
|
"name": "brand_count",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"price_monthly": {
|
|
"name": "price_monthly",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"price_yearly": {
|
|
"name": "price_yearly",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_active": {
|
|
"name": "is_active",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 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": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.query_logs": {
|
|
"name": "query_logs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"vin": {
|
|
"name": "vin",
|
|
"type": "varchar(17)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brand_id": {
|
|
"name": "brand_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"success": {
|
|
"name": "success",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"error_message": {
|
|
"name": "error_message",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"response_time_ms": {
|
|
"name": "response_time_ms",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"timings": {
|
|
"name": "timings",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"query_logs_user_id_created_at_idx": {
|
|
"name": "query_logs_user_id_created_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"query_logs_vin_idx": {
|
|
"name": "query_logs_vin_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vin",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"query_logs_user_id_users_id_fk": {
|
|
"name": "query_logs_user_id_users_id_fk",
|
|
"tableFrom": "query_logs",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"query_logs_brand_id_brands_id_fk": {
|
|
"name": "query_logs_brand_id_brands_id_fk",
|
|
"tableFrom": "query_logs",
|
|
"tableTo": "brands",
|
|
"columnsFrom": [
|
|
"brand_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.referrals": {
|
|
"name": "referrals",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"referrer_id": {
|
|
"name": "referrer_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"referred_id": {
|
|
"name": "referred_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"reward_applied": {
|
|
"name": "reward_applied",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"referrals_referrer_id_idx": {
|
|
"name": "referrals_referrer_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "referrer_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"referrals_referred_id_idx": {
|
|
"name": "referrals_referred_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "referred_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"referrals_referrer_id_users_id_fk": {
|
|
"name": "referrals_referrer_id_users_id_fk",
|
|
"tableFrom": "referrals",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"referrer_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"referrals_referred_id_users_id_fk": {
|
|
"name": "referrals_referred_id_users_id_fk",
|
|
"tableFrom": "referrals",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"referred_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.schema_pics": {
|
|
"name": "schema_pics",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"category_id": {
|
|
"name": "category_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"image_url": {
|
|
"name": "image_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"hotspots": {
|
|
"name": "hotspots",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'[]'"
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pl24'"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"schema_pics_category_id_idx": {
|
|
"name": "schema_pics_category_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "category_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"schema_pics_category_id_categories_id_fk": {
|
|
"name": "schema_pics_category_id_categories_id_fk",
|
|
"tableFrom": "schema_pics",
|
|
"tableTo": "categories",
|
|
"columnsFrom": [
|
|
"category_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sessions": {
|
|
"name": "sessions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"ip_address": {
|
|
"name": "ip_address",
|
|
"type": "varchar(45)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"user_agent": {
|
|
"name": "user_agent",
|
|
"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": {
|
|
"sessions_token_idx": {
|
|
"name": "sessions_token_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "token",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"sessions_user_id_users_id_fk": {
|
|
"name": "sessions_user_id_users_id_fk",
|
|
"tableFrom": "sessions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user_brands": {
|
|
"name": "user_brands",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"subscription_id": {
|
|
"name": "subscription_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brand_id": {
|
|
"name": "brand_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_brands_user_id_idx": {
|
|
"name": "user_brands_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"user_brands_unique_idx": {
|
|
"name": "user_brands_unique_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "subscription_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "brand_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_brands_user_id_users_id_fk": {
|
|
"name": "user_brands_user_id_users_id_fk",
|
|
"tableFrom": "user_brands",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_brands_subscription_id_user_subscriptions_id_fk": {
|
|
"name": "user_brands_subscription_id_user_subscriptions_id_fk",
|
|
"tableFrom": "user_brands",
|
|
"tableTo": "user_subscriptions",
|
|
"columnsFrom": [
|
|
"subscription_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_brands_brand_id_brands_id_fk": {
|
|
"name": "user_brands_brand_id_brands_id_fk",
|
|
"tableFrom": "user_brands",
|
|
"tableTo": "brands",
|
|
"columnsFrom": [
|
|
"brand_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user_subscriptions": {
|
|
"name": "user_subscriptions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"plan_id": {
|
|
"name": "plan_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pending'"
|
|
},
|
|
"billing_period": {
|
|
"name": "billing_period",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'monthly'"
|
|
},
|
|
"start_date": {
|
|
"name": "start_date",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"end_date": {
|
|
"name": "end_date",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cancelled_at": {
|
|
"name": "cancelled_at",
|
|
"type": "timestamp with time zone",
|
|
"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": {
|
|
"user_subscriptions_user_id_idx": {
|
|
"name": "user_subscriptions_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"user_subscriptions_status_idx": {
|
|
"name": "user_subscriptions_status_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_subscriptions_user_id_users_id_fk": {
|
|
"name": "user_subscriptions_user_id_users_id_fk",
|
|
"tableFrom": "user_subscriptions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_subscriptions_plan_id_plans_id_fk": {
|
|
"name": "user_subscriptions_plan_id_plans_id_fk",
|
|
"tableFrom": "user_subscriptions",
|
|
"tableTo": "plans",
|
|
"columnsFrom": [
|
|
"plan_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user_vehicles": {
|
|
"name": "user_vehicles",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"vehicle_id": {
|
|
"name": "vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"last_accessed_at": {
|
|
"name": "last_accessed_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_vehicles_user_vehicle_idx": {
|
|
"name": "user_vehicles_user_vehicle_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"user_vehicles_user_id_idx": {
|
|
"name": "user_vehicles_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_vehicles_user_id_users_id_fk": {
|
|
"name": "user_vehicles_user_id_users_id_fk",
|
|
"tableFrom": "user_vehicles",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_vehicles_vehicle_id_vehicles_id_fk": {
|
|
"name": "user_vehicles_vehicle_id_vehicles_id_fk",
|
|
"tableFrom": "user_vehicles",
|
|
"tableTo": "vehicles",
|
|
"columnsFrom": [
|
|
"vehicle_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()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email_verified": {
|
|
"name": "email_verified",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"image": {
|
|
"name": "image",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'user'"
|
|
},
|
|
"referral_code": {
|
|
"name": "referral_code",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"referred_by": {
|
|
"name": "referred_by",
|
|
"type": "uuid",
|
|
"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": {
|
|
"users_email_idx": {
|
|
"name": "users_email_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "email",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"users_referral_code_idx": {
|
|
"name": "users_referral_code_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "referral_code",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.vehicles": {
|
|
"name": "vehicles",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"vin": {
|
|
"name": "vin",
|
|
"type": "varchar(17)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brand_id": {
|
|
"name": "brand_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"brand_name": {
|
|
"name": "brand_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model": {
|
|
"name": "model",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"year": {
|
|
"name": "year",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"engine": {
|
|
"name": "engine",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"transmission": {
|
|
"name": "transmission",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"body_type": {
|
|
"name": "body_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"market": {
|
|
"name": "market",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"raw_data": {
|
|
"name": "raw_data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pl24'"
|
|
},
|
|
"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": {
|
|
"vehicles_vin_unique_idx": {
|
|
"name": "vehicles_vin_unique_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vin",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"vehicles_brand_id_brands_id_fk": {
|
|
"name": "vehicles_brand_id_brands_id_fk",
|
|
"tableFrom": "vehicles",
|
|
"tableTo": "brands",
|
|
"columnsFrom": [
|
|
"brand_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.verifications": {
|
|
"name": "verifications",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"identifier": {
|
|
"name": "identifier",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"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": {
|
|
"verifications_identifier_idx": {
|
|
"name": "verifications_identifier_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "identifier",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_catalogs": {
|
|
"name": "emex_catalogs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"catalog_id": {
|
|
"name": "catalog_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"code": {
|
|
"name": "code",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"brand_name": {
|
|
"name": "brand_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source_id": {
|
|
"name": "source_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_catalogs_catalog_id_idx": {
|
|
"name": "emex_catalogs_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_catalogs_code_idx": {
|
|
"name": "emex_catalogs_code_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "code",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_part_groups": {
|
|
"name": "emex_part_groups",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"emex_catalog_id": {
|
|
"name": "emex_catalog_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name_original": {
|
|
"name": "name_original",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"parent_group_id": {
|
|
"name": "parent_group_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"has_parts": {
|
|
"name": "has_parts",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"has_children": {
|
|
"name": "has_children",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"source_id": {
|
|
"name": "source_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_part_groups_catalog_id_idx": {
|
|
"name": "emex_part_groups_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_part_groups_group_id_idx": {
|
|
"name": "emex_part_groups_group_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_part_groups_catalog_group_idx": {
|
|
"name": "emex_part_groups_catalog_group_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_part_groups_emex_catalog_id_emex_catalogs_id_fk": {
|
|
"name": "emex_part_groups_emex_catalog_id_emex_catalogs_id_fk",
|
|
"tableFrom": "emex_part_groups",
|
|
"tableTo": "emex_catalogs",
|
|
"columnsFrom": [
|
|
"emex_catalog_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_part_images": {
|
|
"name": "emex_part_images",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"emex_part_id": {
|
|
"name": "emex_part_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"image_url": {
|
|
"name": "image_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"original_url": {
|
|
"name": "original_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_part_images_part_id_idx": {
|
|
"name": "emex_part_images_part_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_part_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_part_images_emex_part_id_emex_parts_id_fk": {
|
|
"name": "emex_part_images_emex_part_id_emex_parts_id_fk",
|
|
"tableFrom": "emex_part_images",
|
|
"tableTo": "emex_parts",
|
|
"columnsFrom": [
|
|
"emex_part_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_part_numbers": {
|
|
"name": "emex_part_numbers",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"emex_part_id": {
|
|
"name": "emex_part_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"oem_code": {
|
|
"name": "oem_code",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_main": {
|
|
"name": "is_main",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_part_numbers_part_id_idx": {
|
|
"name": "emex_part_numbers_part_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_part_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_part_numbers_oem_code_idx": {
|
|
"name": "emex_part_numbers_oem_code_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "oem_code",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_part_numbers_emex_part_id_emex_parts_id_fk": {
|
|
"name": "emex_part_numbers_emex_part_id_emex_parts_id_fk",
|
|
"tableFrom": "emex_part_numbers",
|
|
"tableTo": "emex_parts",
|
|
"columnsFrom": [
|
|
"emex_part_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_parts": {
|
|
"name": "emex_parts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"emex_catalog_id": {
|
|
"name": "emex_catalog_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"part_id": {
|
|
"name": "part_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"part_number": {
|
|
"name": "part_number",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name_original": {
|
|
"name": "name_original",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"oem_number": {
|
|
"name": "oem_number",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"hotspot_index": {
|
|
"name": "hotspot_index",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"raw_data": {
|
|
"name": "raw_data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source_id": {
|
|
"name": "source_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_parts_catalog_id_idx": {
|
|
"name": "emex_parts_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_parts_group_id_idx": {
|
|
"name": "emex_parts_group_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_parts_part_number_idx": {
|
|
"name": "emex_parts_part_number_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "part_number",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_parts_oem_number_idx": {
|
|
"name": "emex_parts_oem_number_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "oem_number",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_parts_emex_catalog_id_emex_catalogs_id_fk": {
|
|
"name": "emex_parts_emex_catalog_id_emex_catalogs_id_fk",
|
|
"tableFrom": "emex_parts",
|
|
"tableTo": "emex_catalogs",
|
|
"columnsFrom": [
|
|
"emex_catalog_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"emex_parts_group_id_emex_part_groups_id_fk": {
|
|
"name": "emex_parts_group_id_emex_part_groups_id_fk",
|
|
"tableFrom": "emex_parts",
|
|
"tableTo": "emex_part_groups",
|
|
"columnsFrom": [
|
|
"group_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_schema_pics": {
|
|
"name": "emex_schema_pics",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"image_url": {
|
|
"name": "image_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"original_url": {
|
|
"name": "original_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"local_path": {
|
|
"name": "local_path",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"hotspots": {
|
|
"name": "hotspots",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'[]'"
|
|
},
|
|
"width": {
|
|
"name": "width",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"height": {
|
|
"name": "height",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": 0
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_schema_pics_group_id_idx": {
|
|
"name": "emex_schema_pics_group_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_schema_pics_group_path_idx": {
|
|
"name": "emex_schema_pics_group_path_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "local_path",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_schema_pics_group_id_emex_part_groups_id_fk": {
|
|
"name": "emex_schema_pics_group_id_emex_part_groups_id_fk",
|
|
"tableFrom": "emex_schema_pics",
|
|
"tableTo": "emex_part_groups",
|
|
"columnsFrom": [
|
|
"group_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_scrape_sessions": {
|
|
"name": "emex_scrape_sessions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"vin": {
|
|
"name": "vin",
|
|
"type": "varchar(17)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pending'"
|
|
},
|
|
"job_id": {
|
|
"name": "job_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"result": {
|
|
"name": "result",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"error_message": {
|
|
"name": "error_message",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"started_at": {
|
|
"name": "started_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"completed_at": {
|
|
"name": "completed_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_scrape_sessions_vin_idx": {
|
|
"name": "emex_scrape_sessions_vin_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vin",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_scrape_sessions_status_idx": {
|
|
"name": "emex_scrape_sessions_status_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_vehicle_group_links": {
|
|
"name": "emex_vehicle_group_links",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"emex_vehicle_id": {
|
|
"name": "emex_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"emex_group_id": {
|
|
"name": "emex_group_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"ssd": {
|
|
"name": "ssd",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_vgl_vehicle_group_idx": {
|
|
"name": "emex_vgl_vehicle_group_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "emex_group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_vgl_group_idx": {
|
|
"name": "emex_vgl_group_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_vehicle_group_links_emex_vehicle_id_emex_vehicles_id_fk": {
|
|
"name": "emex_vehicle_group_links_emex_vehicle_id_emex_vehicles_id_fk",
|
|
"tableFrom": "emex_vehicle_group_links",
|
|
"tableTo": "emex_vehicles",
|
|
"columnsFrom": [
|
|
"emex_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"emex_vehicle_group_links_emex_group_id_emex_part_groups_id_fk": {
|
|
"name": "emex_vehicle_group_links_emex_group_id_emex_part_groups_id_fk",
|
|
"tableFrom": "emex_vehicle_group_links",
|
|
"tableTo": "emex_part_groups",
|
|
"columnsFrom": [
|
|
"emex_group_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_vehicle_part_links": {
|
|
"name": "emex_vehicle_part_links",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"emex_vehicle_id": {
|
|
"name": "emex_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"emex_part_id": {
|
|
"name": "emex_part_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"emex_group_id": {
|
|
"name": "emex_group_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"quantity": {
|
|
"name": "quantity",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"position": {
|
|
"name": "position",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_vpl_vehicle_part_group_idx": {
|
|
"name": "emex_vpl_vehicle_part_group_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "emex_part_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "emex_group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_vpl_part_idx": {
|
|
"name": "emex_vpl_part_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_part_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_vpl_group_idx": {
|
|
"name": "emex_vpl_group_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_vehicle_part_links_emex_vehicle_id_emex_vehicles_id_fk": {
|
|
"name": "emex_vehicle_part_links_emex_vehicle_id_emex_vehicles_id_fk",
|
|
"tableFrom": "emex_vehicle_part_links",
|
|
"tableTo": "emex_vehicles",
|
|
"columnsFrom": [
|
|
"emex_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"emex_vehicle_part_links_emex_part_id_emex_parts_id_fk": {
|
|
"name": "emex_vehicle_part_links_emex_part_id_emex_parts_id_fk",
|
|
"tableFrom": "emex_vehicle_part_links",
|
|
"tableTo": "emex_parts",
|
|
"columnsFrom": [
|
|
"emex_part_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"emex_vehicle_part_links_emex_group_id_emex_part_groups_id_fk": {
|
|
"name": "emex_vehicle_part_links_emex_group_id_emex_part_groups_id_fk",
|
|
"tableFrom": "emex_vehicle_part_links",
|
|
"tableTo": "emex_part_groups",
|
|
"columnsFrom": [
|
|
"emex_group_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_vehicle_vins": {
|
|
"name": "emex_vehicle_vins",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"emex_vehicle_id": {
|
|
"name": "emex_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vin": {
|
|
"name": "vin",
|
|
"type": "varchar(17)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_vehicle_vins_vin_idx": {
|
|
"name": "emex_vehicle_vins_vin_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vin",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_vehicle_vins_vehicle_id_idx": {
|
|
"name": "emex_vehicle_vins_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "emex_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_vehicle_vins_emex_vehicle_id_emex_vehicles_id_fk": {
|
|
"name": "emex_vehicle_vins_emex_vehicle_id_emex_vehicles_id_fk",
|
|
"tableFrom": "emex_vehicle_vins",
|
|
"tableTo": "emex_vehicles",
|
|
"columnsFrom": [
|
|
"emex_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.emex_vehicles": {
|
|
"name": "emex_vehicles",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"catalog_id": {
|
|
"name": "catalog_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vehicle_id": {
|
|
"name": "vehicle_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_code": {
|
|
"name": "model_code",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"engine": {
|
|
"name": "engine",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"engine_code": {
|
|
"name": "engine_code",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"body_type": {
|
|
"name": "body_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"transmission": {
|
|
"name": "transmission",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"drive_type": {
|
|
"name": "drive_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"fuel_type": {
|
|
"name": "fuel_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"year_from": {
|
|
"name": "year_from",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"year_to": {
|
|
"name": "year_to",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"ssd": {
|
|
"name": "ssd",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"options_raw": {
|
|
"name": "options_raw",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"raw_data": {
|
|
"name": "raw_data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source_id": {
|
|
"name": "source_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"emex_vehicles_vehicle_id_idx": {
|
|
"name": "emex_vehicles_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_vehicles_catalog_id_idx": {
|
|
"name": "emex_vehicles_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_vehicles_name_idx": {
|
|
"name": "emex_vehicles_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"emex_vehicles_source_id_idx": {
|
|
"name": "emex_vehicles_source_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "source_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"emex_vehicles_catalog_id_emex_catalogs_id_fk": {
|
|
"name": "emex_vehicles_catalog_id_emex_catalogs_id_fk",
|
|
"tableFrom": "emex_vehicles",
|
|
"tableTo": "emex_catalogs",
|
|
"columnsFrom": [
|
|
"catalog_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pcat_part_groups": {
|
|
"name": "pcat_part_groups",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"catalog_id": {
|
|
"name": "catalog_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"parent_id": {
|
|
"name": "parent_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"img_url": {
|
|
"name": "img_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"has_subgroups": {
|
|
"name": "has_subgroups",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"has_parts": {
|
|
"name": "has_parts",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pcat_part_groups_catalog_id_idx": {
|
|
"name": "pcat_part_groups_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pcat_part_groups_parent_id_idx": {
|
|
"name": "pcat_part_groups_parent_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "parent_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pcat_parts": {
|
|
"name": "pcat_parts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"notice": {
|
|
"name": "notice",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pcat_parts_name_idx": {
|
|
"name": "pcat_parts_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pcat_schema_pics": {
|
|
"name": "pcat_schema_pics",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"car_id": {
|
|
"name": "car_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"img_url": {
|
|
"name": "img_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"img_description": {
|
|
"name": "img_description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"hotspots": {
|
|
"name": "hotspots",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pcat_schema_pics_group_car_idx": {
|
|
"name": "pcat_schema_pics_group_car_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "car_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pcat_vehicles": {
|
|
"name": "pcat_vehicles",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"catalog_id": {
|
|
"name": "catalog_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"vin": {
|
|
"name": "vin",
|
|
"type": "varchar(17)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"parameters": {
|
|
"name": "parameters",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"raw_data": {
|
|
"name": "raw_data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pcat_vehicles_vin_idx": {
|
|
"name": "pcat_vehicles_vin_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vin",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pcat_vehicles_catalog_id_idx": {
|
|
"name": "pcat_vehicles_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_catalogs": {
|
|
"name": "pl24_catalogs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"catalog_id": {
|
|
"name": "catalog_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brand_name": {
|
|
"name": "brand_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_catalogs_catalog_id_idx": {
|
|
"name": "pl24_catalogs_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_part_groups": {
|
|
"name": "pl24_part_groups",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"pl24_vehicle_id": {
|
|
"name": "pl24_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"parent_group_id": {
|
|
"name": "parent_group_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_part_groups_vehicle_id_idx": {
|
|
"name": "pl24_part_groups_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "pl24_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pl24_part_groups_group_id_idx": {
|
|
"name": "pl24_part_groups_group_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_part_groups_pl24_vehicle_id_pl24_vehicles_id_fk": {
|
|
"name": "pl24_part_groups_pl24_vehicle_id_pl24_vehicles_id_fk",
|
|
"tableFrom": "pl24_part_groups",
|
|
"tableTo": "pl24_vehicles",
|
|
"columnsFrom": [
|
|
"pl24_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_part_images": {
|
|
"name": "pl24_part_images",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"pl24_part_id": {
|
|
"name": "pl24_part_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"image_url": {
|
|
"name": "image_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"original_url": {
|
|
"name": "original_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_part_images_part_id_idx": {
|
|
"name": "pl24_part_images_part_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "pl24_part_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_part_images_pl24_part_id_pl24_parts_id_fk": {
|
|
"name": "pl24_part_images_pl24_part_id_pl24_parts_id_fk",
|
|
"tableFrom": "pl24_part_images",
|
|
"tableTo": "pl24_parts",
|
|
"columnsFrom": [
|
|
"pl24_part_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_part_numbers": {
|
|
"name": "pl24_part_numbers",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"pl24_part_id": {
|
|
"name": "pl24_part_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"oem_code": {
|
|
"name": "oem_code",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_main": {
|
|
"name": "is_main",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_part_numbers_part_id_idx": {
|
|
"name": "pl24_part_numbers_part_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "pl24_part_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pl24_part_numbers_oem_code_idx": {
|
|
"name": "pl24_part_numbers_oem_code_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "oem_code",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_part_numbers_pl24_part_id_pl24_parts_id_fk": {
|
|
"name": "pl24_part_numbers_pl24_part_id_pl24_parts_id_fk",
|
|
"tableFrom": "pl24_part_numbers",
|
|
"tableTo": "pl24_parts",
|
|
"columnsFrom": [
|
|
"pl24_part_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_parts": {
|
|
"name": "pl24_parts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"pl24_vehicle_id": {
|
|
"name": "pl24_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"part_id": {
|
|
"name": "part_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"quantity": {
|
|
"name": "quantity",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"position": {
|
|
"name": "position",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"hotspot_index": {
|
|
"name": "hotspot_index",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"raw_data": {
|
|
"name": "raw_data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_parts_vehicle_id_idx": {
|
|
"name": "pl24_parts_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "pl24_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pl24_parts_group_id_idx": {
|
|
"name": "pl24_parts_group_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_parts_pl24_vehicle_id_pl24_vehicles_id_fk": {
|
|
"name": "pl24_parts_pl24_vehicle_id_pl24_vehicles_id_fk",
|
|
"tableFrom": "pl24_parts",
|
|
"tableTo": "pl24_vehicles",
|
|
"columnsFrom": [
|
|
"pl24_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"pl24_parts_group_id_pl24_part_groups_id_fk": {
|
|
"name": "pl24_parts_group_id_pl24_part_groups_id_fk",
|
|
"tableFrom": "pl24_parts",
|
|
"tableTo": "pl24_part_groups",
|
|
"columnsFrom": [
|
|
"group_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_schema_pics": {
|
|
"name": "pl24_schema_pics",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"image_url": {
|
|
"name": "image_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"original_url": {
|
|
"name": "original_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"hotspots": {
|
|
"name": "hotspots",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'[]'"
|
|
},
|
|
"width": {
|
|
"name": "width",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"height": {
|
|
"name": "height",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_schema_pics_group_id_idx": {
|
|
"name": "pl24_schema_pics_group_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_schema_pics_group_id_pl24_part_groups_id_fk": {
|
|
"name": "pl24_schema_pics_group_id_pl24_part_groups_id_fk",
|
|
"tableFrom": "pl24_schema_pics",
|
|
"tableTo": "pl24_part_groups",
|
|
"columnsFrom": [
|
|
"group_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_vehicle_groups": {
|
|
"name": "pl24_vehicle_groups",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"catalog_id": {
|
|
"name": "catalog_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"parent_group_id": {
|
|
"name": "parent_group_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_vehicle_groups_catalog_id_idx": {
|
|
"name": "pl24_vehicle_groups_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pl24_vehicle_groups_group_id_idx": {
|
|
"name": "pl24_vehicle_groups_group_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "group_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_vehicle_groups_catalog_id_pl24_catalogs_id_fk": {
|
|
"name": "pl24_vehicle_groups_catalog_id_pl24_catalogs_id_fk",
|
|
"tableFrom": "pl24_vehicle_groups",
|
|
"tableTo": "pl24_catalogs",
|
|
"columnsFrom": [
|
|
"catalog_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_vehicle_parts": {
|
|
"name": "pl24_vehicle_parts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"pl24_vehicle_id": {
|
|
"name": "pl24_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"pl24_part_id": {
|
|
"name": "pl24_part_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"fitment_info": {
|
|
"name": "fitment_info",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_vehicle_parts_vehicle_id_idx": {
|
|
"name": "pl24_vehicle_parts_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "pl24_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pl24_vehicle_parts_part_id_idx": {
|
|
"name": "pl24_vehicle_parts_part_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "pl24_part_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_vehicle_parts_pl24_vehicle_id_pl24_vehicles_id_fk": {
|
|
"name": "pl24_vehicle_parts_pl24_vehicle_id_pl24_vehicles_id_fk",
|
|
"tableFrom": "pl24_vehicle_parts",
|
|
"tableTo": "pl24_vehicles",
|
|
"columnsFrom": [
|
|
"pl24_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"pl24_vehicle_parts_pl24_part_id_pl24_parts_id_fk": {
|
|
"name": "pl24_vehicle_parts_pl24_part_id_pl24_parts_id_fk",
|
|
"tableFrom": "pl24_vehicle_parts",
|
|
"tableTo": "pl24_parts",
|
|
"columnsFrom": [
|
|
"pl24_part_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_vehicle_vins": {
|
|
"name": "pl24_vehicle_vins",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"pl24_vehicle_id": {
|
|
"name": "pl24_vehicle_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vin": {
|
|
"name": "vin",
|
|
"type": "varchar(17)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_vehicle_vins_vin_idx": {
|
|
"name": "pl24_vehicle_vins_vin_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vin",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pl24_vehicle_vins_vehicle_id_idx": {
|
|
"name": "pl24_vehicle_vins_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "pl24_vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_vehicle_vins_pl24_vehicle_id_pl24_vehicles_id_fk": {
|
|
"name": "pl24_vehicle_vins_pl24_vehicle_id_pl24_vehicles_id_fk",
|
|
"tableFrom": "pl24_vehicle_vins",
|
|
"tableTo": "pl24_vehicles",
|
|
"columnsFrom": [
|
|
"pl24_vehicle_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.pl24_vehicles": {
|
|
"name": "pl24_vehicles",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"catalog_id": {
|
|
"name": "catalog_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"vehicle_id": {
|
|
"name": "vehicle_id",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_code": {
|
|
"name": "model_code",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"engine": {
|
|
"name": "engine",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"transmission": {
|
|
"name": "transmission",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"body_type": {
|
|
"name": "body_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"market": {
|
|
"name": "market",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"year_from": {
|
|
"name": "year_from",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"year_to": {
|
|
"name": "year_to",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"raw_data": {
|
|
"name": "raw_data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pl24_vehicles_vehicle_id_idx": {
|
|
"name": "pl24_vehicles_vehicle_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "vehicle_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"pl24_vehicles_catalog_id_idx": {
|
|
"name": "pl24_vehicles_catalog_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "catalog_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"pl24_vehicles_catalog_id_pl24_catalogs_id_fk": {
|
|
"name": "pl24_vehicles_catalog_id_pl24_catalogs_id_fk",
|
|
"tableFrom": "pl24_vehicles",
|
|
"tableTo": "pl24_catalogs",
|
|
"columnsFrom": [
|
|
"catalog_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |