mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
refactor(alembic): 优化迁移脚本生成逻辑并添加模型自动发现
添加ImportUtil工具类用于自动发现SQLAlchemy模型 优化alembic迁移脚本生成逻辑,避免空变更生成 修复前端模板中的按钮标签错误 简化revision命令参数
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from typing import Optional, List
|
||||
from typing import TYPE_CHECKING, Optional, List
|
||||
from sqlalchemy import Boolean, String, Integer, ForeignKey
|
||||
from sqlalchemy.orm import relationship, Mapped, mapped_column
|
||||
|
||||
from app.core.base_model import ModelMixin
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from app.api.v1.module_system.role.model import RoleModel
|
||||
from app.api.v1.module_system.user.model import UserModel
|
||||
|
||||
class DeptModel(ModelMixin):
|
||||
"""
|
||||
部门表
|
||||
|
||||
@@ -4,13 +4,16 @@
|
||||
定义岗位相关数据模型
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
from typing import TYPE_CHECKING, List
|
||||
|
||||
from sqlalchemy import Boolean, String, Integer
|
||||
from sqlalchemy.orm import relationship, Mapped, mapped_column
|
||||
|
||||
from app.core.base_model import CreatorMixin
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from app.api.v1.module_system.user.model import UserModel
|
||||
|
||||
|
||||
class PositionModel(CreatorMixin):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user