Logo
Explore Help
Register Sign In
nt_web_template/full-stack-fastapi-template
2
0
Fork 0
You've already forked full-stack-fastapi-template
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
73b28840577b53ae3e9886f0cd80fc65d91c41bf
full-stack-fastapi-template/src/backend/app/db/engine.py

6 lines
131 B
Python
Raw Normal View History

✨ Adopt SQLModel, create models, start using it (#559) * 🔥 Remove old SQLAlchemy models * ✨ Add new SQLModel models * 🔧 Update Alembic configs to work with SQLModel * ✨ Re-generate initial Alembic migration * 🔧 Update PostgreSQL driver connection string URL * ✨ Create new SQLModel engine * 🔥 Remove old unneeded SQLAlchemy-specific files * ♻️ Update init_db * ♻️ Use new SQLModel session * ♻️ Update conftest with new DB Session * ♻️ Update pre-start scripts to use SQLModel session * ♻️ Import new SQLModel models * ✨ Create new simplified create_user crud util * ♻️ Update import in CRUDBase class (soon to be removed) * 🙈 Update .gitignore with Python files
2023-11-25 00:08:22 +01:00
from sqlmodel import create_engine
from app.core.config import settings
engine = create_engine(settings.SQLALCHEMY_DATABASE_URI)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.3 Page: 32ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API