"""sso

Revision ID: 6cf79ef38546
Revises: 4e2cab5beafd
Create Date: 2023-04-21 13:10:45.065001

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '6cf79ef38546'
down_revision = '4e2cab5beafd'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute("update cmf_auth_open_id_plugin set domain = 'example.com' where domain is null")
    op.alter_column('cmf_auth_open_id_plugin', 'domain',
               existing_type=sa.VARCHAR(length=4096),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cmf_auth_open_id_plugin', 'domain',
               existing_type=sa.VARCHAR(length=4096),
               nullable=True)
    # ### end Alembic commands ###
