fix(card): 新增渠道cic

This commit is contained in:
xingc
2025-05-06 21:51:02 +08:00
parent 2b6b53b13d
commit 30a03efd3b
5 changed files with 147 additions and 4 deletions

View File

@@ -0,0 +1,42 @@
"""fix product
Revision ID: 6bd2808b89b3
Revises: 2d63d72e671a
Create Date: 2025-05-06 17:26:55.406210
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision: str = '6bd2808b89b3'
down_revision: Union[str, None] = '2d63d72e671a'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('system_chats', 'is_deleted',
existing_type=mysql.TINYINT(display_width=4),
nullable=False)
op.alter_column('system_users', 'avatar_url',
existing_type=mysql.VARCHAR(length=500),
nullable=True,
existing_comment='头像链接')
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('system_users', 'avatar_url',
existing_type=mysql.VARCHAR(length=500),
nullable=False,
existing_comment='头像链接')
op.alter_column('system_chats', 'is_deleted',
existing_type=mysql.TINYINT(display_width=4),
nullable=True)
# ### end Alembic commands ###

View File

@@ -0,0 +1,48 @@
"""new add support platform
Revision ID: e2a204afe670
Revises: 6bd2808b89b3
Create Date: 2025-05-06 21:36:32.322778
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision: str = 'e2a204afe670'
down_revision: Union[str, None] = '6bd2808b89b3'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('system_cache_cards', 'source',
existing_type=mysql.ENUM('PSA', 'BGS', 'CGC', 'GBTC', 'CCG', 'BCTC', 'CIC'),
comment='数据来源PSA、BGS、CGC、GBTC、CCG、BCTC、CIC',
existing_comment='数据来源PSA、BGS、CGC、GBTC、CCG、BCTC',
existing_nullable=False)
op.alter_column('system_cards', 'source',
existing_type=mysql.ENUM('PSA', 'BGS', 'CGC', 'GBTC', 'CCG', 'BCTC', 'CIC', 'OTHER'),
comment='来源PSA、BGS、CGC、GBTC、CCG、BCTC、CIC :采集 、OTHER自定义',
existing_comment='来源PSA、BGS、CGC、GBTC、CCG、BCTC :采集 、OTHER自定义',
existing_nullable=False)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('system_cards', 'source',
existing_type=mysql.ENUM('PSA', 'BGS', 'CGC', 'GBTC', 'CCG', 'BCTC', 'OTHER'),
comment='来源PSA、BGS、CGC、GBTC、CCG、BCTC :采集 、OTHER自定义',
existing_comment='来源PSA、BGS、CGC、GBTC、CCG、BCTC、CIC :采集 、OTHER自定义',
existing_nullable=False)
op.alter_column('system_cache_cards', 'source',
existing_type=mysql.ENUM('PSA', 'BGS', 'CGC', 'GBTC', 'CCG', 'BCTC'),
comment='数据来源PSA、BGS、CGC、GBTC、CCG、BCTC',
existing_comment='数据来源PSA、BGS、CGC、GBTC、CCG、BCTC、CIC',
existing_nullable=False)
# ### end Alembic commands ###