Deploy to Staging / deploy (push) Waiting to run
Lint Backend / lint-backend (push) Waiting to run
Playwright Tests / changes (push) Waiting to run
Playwright Tests / test-playwright (1, 4) (push) Blocked by required conditions
Playwright Tests / test-playwright (2, 4) (push) Blocked by required conditions
Playwright Tests / test-playwright (3, 4) (push) Blocked by required conditions
Playwright Tests / test-playwright (4, 4) (push) Blocked by required conditions
Playwright Tests / merge-playwright-reports (push) Blocked by required conditions
Playwright Tests / alls-green-playwright (push) Blocked by required conditions
Test Backend / test-backend (push) Waiting to run
Test Docker Compose / test-docker-compose (push) Waiting to run
24 lines
402 B
Python
24 lines
402 B
Python
import logging
|
|
|
|
from sqlmodel import Session
|
|
|
|
from app.core.db import engine, init_db
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def init() -> None:
|
|
with Session(engine) as session:
|
|
init_db(session)
|
|
|
|
|
|
def main() -> None:
|
|
logger.info("Creating initial data")
|
|
init()
|
|
logger.info("Initial data created")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|