Database Schema
Database Schema Reference
Section titled “Database Schema Reference”Complete PostgreSQL schema for DealAI.lt.
Core Tables
Section titled “Core Tables”product
Section titled “product”Main product catalog
Columns:
id(SERIAL PRIMARY KEY)external_id(VARCHAR UNIQUE)title(TEXT)brand(VARCHAR)price(NUMERIC)list_price(NUMERIC)availability(VARCHAR)description(TEXT)specifications(JSONB)image_urls(JSONB)category_id(INTEGER)site_id(INTEGER)product_url(TEXT)sku(VARCHAR)created_at(TIMESTAMP)updated_at(TIMESTAMP)added_search(BOOLEAN)
core_category
Section titled “core_category”Hierarchical categories
Columns:
id(SERIAL PRIMARY KEY)name(VARCHAR)slug(VARCHAR UNIQUE)parent_id(INTEGER)category_url(TEXT)level(INTEGER)path(VARCHAR)product_count(INTEGER)
product_crawl_history
Section titled “product_crawl_history”Historical tracking
Columns:
id(BIGSERIAL PRIMARY KEY)product_id(INTEGER)price(NUMERIC)availability(VARCHAR)crawled_at(TIMESTAMP)
product_screenshot
Section titled “product_screenshot”Screenshot metadata
category_product_crawl
Section titled “category_product_crawl”Scraping queue
Next Steps
Section titled “Next Steps”- Database System - Database details
- Configuration - Configuration options