feat: migrate to PostgreSQL + SQLAlchemy ORM, rebrand to Nexus Autoparts
- Migrate from SQLite to PostgreSQL with normalized schema - Add 11 lookup tables (fuel_type, body_type, drivetrain, transmission, materials, position_part, manufacture_type, quality_tier, countries, reference_type, shapes) - Rewrite dashboard/server.py (76 routes) using SQLAlchemy text() queries - Rewrite console/db.py (27 methods) using SQLAlchemy ORM - Add models.py with 27 SQLAlchemy model definitions - Add config.py for centralized DB_URL configuration - Add migrate_to_postgres.py migration script - Add docs/METABASE_GUIDE.md with complete data entry guide - Rebrand from "AUTOPARTS DB" to "NEXUS AUTOPARTS" - Fill vehicle data gaps via NHTSA API + heuristics: engines (cylinders, power, torque), brands (country, founded_year), models (body_type, production years), MYE (drivetrain, transmission, trim) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
"""
|
||||
Configuration settings for the AUTOPARTES console application.
|
||||
Configuration settings for the NEXUS AUTOPARTS console application.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Application metadata
|
||||
VERSION = "1.0.0"
|
||||
APP_NAME = "AUTOPARTES"
|
||||
APP_SUBTITLE = "Sistema de Catalogo de Autopartes"
|
||||
VERSION = "2.0.0"
|
||||
APP_NAME = "NEXUS AUTOPARTS"
|
||||
APP_SUBTITLE = "Tu conexión directa con las partes que necesitas"
|
||||
|
||||
# Database path (relative to the console/ directory, resolved to absolute)
|
||||
_CONSOLE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
DB_PATH = os.path.join(_CONSOLE_DIR, "..", "vehicle_database", "vehicle_database.db")
|
||||
DB_PATH = os.path.normpath(DB_PATH)
|
||||
# Database URL (PostgreSQL)
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
|
||||
from config import DB_URL
|
||||
|
||||
# NHTSA VIN Decoder API
|
||||
NHTSA_API_URL = "https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVin"
|
||||
|
||||
Reference in New Issue
Block a user