chore: 基线提交(重构前代码快照)
- git 初始化 + .gitignore 补全(根 .env / logs / instance / __pycache__ 等) - 修复 utils/.gitignore 误将整个 utils/ 源码层忽略的问题,补入全部工具源码(含 ip2region.xdb) - 含后端全部代码:application / extensions / utils / config / migrations - 含前端 ui/(后续整体迁走) - 不含根 .env(含密钥,本地保留) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 8291c8683c19
|
||||
Revises: 9d75730d2484
|
||||
Create Date: 2023-04-12 13:50:44.865440
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '8291c8683c19'
|
||||
down_revision = '9d75730d2484'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('flask_menu',
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键ID'),
|
||||
sa.Column('create_user', sa.Integer(), nullable=True, comment='创建人'),
|
||||
sa.Column('create_time', sa.DATETIME(), nullable=True, comment='创建时间'),
|
||||
sa.Column('update_user', sa.Integer(), nullable=True, comment='更新人'),
|
||||
sa.Column('update_time', sa.DATETIME(), nullable=True, comment='更新时间'),
|
||||
sa.Column('is_delete', sa.Integer(), nullable=True, comment='删除标识:0-正常 1-已删除'),
|
||||
sa.Column('title', sa.String(length=150), nullable=False, comment='菜单标题'),
|
||||
sa.Column('icon', sa.String(length=50), nullable=True, comment='菜单图标'),
|
||||
sa.Column('parent_id', sa.Integer(), nullable=True, comment='上级ID'),
|
||||
sa.Column('path', sa.String(length=255), nullable=True, comment='菜单路径'),
|
||||
sa.Column('component', sa.String(length=255), nullable=True, comment='菜单组件'),
|
||||
sa.Column('target', sa.String(length=30), nullable=True, comment='打开方式:0-内部打开 1-外部打开'),
|
||||
sa.Column('permission', sa.String(length=150), nullable=True, comment='权限节点'),
|
||||
sa.Column('type', sa.Integer(), nullable=True, comment='菜单类型:0-菜单 1-节点'),
|
||||
sa.Column('status', sa.Integer(), nullable=True, comment='菜单状态:0-正常 1-禁用'),
|
||||
sa.Column('hide', sa.Integer(), nullable=True, comment='是否可见:0-可见 1-不可见'),
|
||||
sa.Column('sort', sa.Integer(), nullable=True, comment='排序'),
|
||||
sa.Column('note', sa.String(length=255), nullable=True, comment='备注'),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.drop_table('flask_menu2')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('flask_menu2',
|
||||
sa.Column('id', mysql.INTEGER(), autoincrement=True, nullable=False, comment='主键ID'),
|
||||
sa.Column('create_user', mysql.INTEGER(), autoincrement=False, nullable=True, comment='创建人'),
|
||||
sa.Column('create_time', mysql.DATETIME(), nullable=True, comment='创建时间'),
|
||||
sa.Column('update_user', mysql.INTEGER(), autoincrement=False, nullable=True, comment='更新人'),
|
||||
sa.Column('update_time', mysql.DATETIME(), nullable=True, comment='更新时间'),
|
||||
sa.Column('is_delete', mysql.INTEGER(), autoincrement=False, nullable=True, comment='删除标识:0-正常 1-已删除'),
|
||||
sa.Column('title', mysql.VARCHAR(charset='utf8mb4', collation='utf8mb4_general_ci', length=150), nullable=False, comment='菜单标题'),
|
||||
sa.Column('icon', mysql.VARCHAR(charset='utf8mb4', collation='utf8mb4_general_ci', length=50), nullable=True, comment='菜单图标'),
|
||||
sa.Column('parent_id', mysql.INTEGER(), autoincrement=False, nullable=True, comment='上级ID'),
|
||||
sa.Column('path', mysql.VARCHAR(charset='utf8mb4', collation='utf8mb4_general_ci', length=255), nullable=True, comment='菜单路径'),
|
||||
sa.Column('component', mysql.VARCHAR(charset='utf8mb4', collation='utf8mb4_general_ci', length=255), nullable=True, comment='菜单组件'),
|
||||
sa.Column('target', mysql.INTEGER(), autoincrement=False, nullable=True, comment='打开方式:0-内部打开 1-外部打开'),
|
||||
sa.Column('permission', mysql.VARCHAR(charset='utf8mb4', collation='utf8mb4_general_ci', length=150), nullable=True, comment='权限节点'),
|
||||
sa.Column('type', mysql.INTEGER(), autoincrement=False, nullable=True, comment='菜单类型:0-菜单 1-节点'),
|
||||
sa.Column('status', mysql.INTEGER(), autoincrement=False, nullable=True, comment='菜单状态:0-正常 1-禁用'),
|
||||
sa.Column('hide', mysql.INTEGER(), autoincrement=False, nullable=True, comment='是否可见:0-可见 1-不可见'),
|
||||
sa.Column('sort', mysql.INTEGER(), autoincrement=False, nullable=True, comment='排序'),
|
||||
sa.Column('note', mysql.VARCHAR(charset='utf8mb4', collation='utf8mb4_general_ci', length=255), nullable=True, comment='备注'),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
mysql_collate='utf8mb4_general_ci',
|
||||
mysql_default_charset='utf8mb4',
|
||||
mysql_engine='InnoDB',
|
||||
mysql_row_format='DYNAMIC'
|
||||
)
|
||||
op.drop_table('flask_menu')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user