14 lines
447 B
Python
Executable File
14 lines
447 B
Python
Executable File
import asyncio
|
|
from app.db.base import Base
|
|
from app.db.session import engine
|
|
from app.models import * # Minden modellt beimportálunk
|
|
|
|
async def init_db():
|
|
async with engine.begin() as conn:
|
|
# Ez a parancs hozza létre a táblákat a modellek alapján
|
|
await conn.run_sync(Base.metadata.create_all)
|
|
print("✅ Minden tábla sikeresen létrejött a 'data' sémában!")
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(init_db())
|