20 lines
501 B
Python
20 lines
501 B
Python
"""保存加密后的登录凭证。"""
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "0003_credentials"
|
|
down_revision = "0002_accounts_only"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
with op.batch_alter_table("accounts") as batch:
|
|
batch.add_column(sa.Column("credential_cipher", sa.Text(), nullable=False, server_default=""))
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table("accounts") as batch:
|
|
batch.drop_column("credential_cipher")
|