- Plate lookup: new plate_vehicles table (v1.7 migration), plate_lookup service with Mexican plate validation, GET/POST endpoints on catalog_bp, plate search UI in catalog vehicle selector - Translations: extend PART_TRANSLATIONS from ~80 to 326 entries covering brake, engine, fuel, cooling, electrical, drivetrain, suspension, steering, exhaust, A/C, lighting, body, interior, fluids, and category translations - Bulk images: image_scraper service with download+resize+placeholder generation, bulk-images and auto-image endpoints on inventory_bp Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
572 B
SQL
17 lines
572 B
SQL
-- Plate-to-vehicle lookup table (tenant DB)
|
|
-- Allows instant vehicle identification from Mexican license plates.
|
|
|
|
CREATE TABLE IF NOT EXISTS plate_vehicles (
|
|
id SERIAL PRIMARY KEY,
|
|
plate VARCHAR(20) UNIQUE NOT NULL,
|
|
make VARCHAR(100),
|
|
model VARCHAR(100),
|
|
year INTEGER,
|
|
vin VARCHAR(17),
|
|
customer_id INTEGER REFERENCES customers(id),
|
|
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_plate_vehicles_plate ON plate_vehicles(plate);
|
|
CREATE INDEX IF NOT EXISTS idx_plate_vehicles_customer ON plate_vehicles(customer_id);
|