Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/
The crawler subdirectory was the only active project. Moving it to the repo root simplifies paths and removes the unnecessary nesting. The vqa/ and immoweb/ directories were legacy/unused and have been removed. Updated .drone.yml, .gitignore, .claude/ docs, and skills to reflect the new flat structure.
This commit is contained in:
parent
e2247be700
commit
eafbc1ac52
221 changed files with 70 additions and 146140 deletions
23
database.py
Normal file
23
database.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import os
|
||||
from sqlmodel import create_engine, SQLModel
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
# PostgreSQL example (or use "sqlite:///database.db" for SQLite)
|
||||
# DATABASE_URL = "postgresql://user:password@localhost/db_name"
|
||||
# DATABASE_URL = "sqlite:///data/wrongmove.db"
|
||||
# DATABASE_URL = "mysql://wrongmove:wrongmove@localhost:3306/wrongmove"
|
||||
DATABASE_URL = os.environ["DB_CONNECTION_STRING"]
|
||||
|
||||
|
||||
debug = os.getenv("ENV", "dev") == "dev"
|
||||
engine = create_engine(DATABASE_URL, echo=debug) # `echo=True` for debug logs
|
||||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
|
||||
|
||||
def init_db():
|
||||
"""Create all tables (only for development; use migrations in production)."""
|
||||
SQLModel.metadata.create_all(engine)
|
||||
Loading…
Add table
Add a link
Reference in a new issue