Initial commit - Migrated to Dev environment

This commit is contained in:
2026-02-03 19:55:45 +00:00
commit a34e5b7976
3518 changed files with 481663 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import asyncio
import os
from sqlalchemy.ext.asyncio import create_async_engine
from sqlalchemy import text
from dotenv import load_dotenv
load_dotenv()
raw_url = os.getenv("DATABASE_URL")
if not raw_url:
raw_url = "postgresql://admin:PASSWORD_111@postgres-db:5432/service_finder"
DATABASE_URL = raw_url.replace("postgresql://", "postgresql+asyncpg://").replace("/service_finder_db", "/service_finder")
async def add_doc_column():
engine = create_async_engine(DATABASE_URL)
async with engine.begin() as conn:
print("📄 Dokumentum oszlop hozzáadása a Costs táblához...")
await conn.execute(text("""
ALTER TABLE data.costs
ADD COLUMN IF NOT EXISTS document_url VARCHAR(255);
"""))
print("✅ KÉSZ! Mehetnek a fájlok.")
await engine.dispose()
if __name__ == "__main__":
asyncio.run(add_doc_column())