mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-10 02:07:12 +08:00
feat: Backend i18n
This commit is contained in:
@@ -7,7 +7,7 @@ Create Date: 2025-07-06 18:03:36.143060
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel.sql.sqltypes
|
||||
from sqlmodel import BigInteger, String, column, table
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
@@ -25,8 +25,26 @@ def upgrade():
|
||||
sa.Column('create_time', sa.BigInteger(), default=0, nullable=False)
|
||||
)
|
||||
op.create_index(op.f('ix_sys_workspace_id'), 'sys_workspace', ['id'], unique=False)
|
||||
|
||||
accounts_table = table(
|
||||
"sys_workspace",
|
||||
column("id", BigInteger),
|
||||
column("name", String),
|
||||
column("create_time", BigInteger),
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
accounts_table,
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "i18n_default_workspace",
|
||||
"create_time": 1672531199000
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
def downgrade():
|
||||
op.drop_table('sys_workspace')
|
||||
op.drop_index(op.f('ix_sys_workspace_id'), table_name='sys_workspace')
|
||||
op.drop_table('sys_workspace')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user