mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-23 13:33:08 +00:00
Add postgresql database support (#475)
* feat: add postgresql db supports * change: change mysql conn str create way * fix: Modify the default alembic migration file to meet multi-database support * Update settings and lint * update models * Simplify database config * Simplify the get db method * Update create db url * Updated model type adaptation * Update sql scripts * Fix models type * Adaptation to postgresql code generation * Update README.md * Fix alembic file template * Update docker scripts
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# ruff: noqa: I001
|
||||
from backend.database.db import create_table
|
||||
import logging
|
||||
import sys
|
||||
|
||||
@@ -8,7 +9,6 @@ from anyio import run
|
||||
|
||||
sys.path.append('../')
|
||||
|
||||
from backend.database.db_mysql import create_table
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
Reference in New Issue
Block a user