Updated courses model and fixed rich text editor tool bar drop down problem
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
"""update course string max length
|
||||
|
||||
Revision ID: 01b284ceabf9
|
||||
Revises: 71a20fad83f9
|
||||
Create Date: 2024-10-01 12:59:07.159639
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel.sql.sqltypes
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '01b284ceabf9'
|
||||
down_revision = '71a20fad83f9'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('course', 'long_description',
|
||||
existing_type=sa.VARCHAR(length=2048),
|
||||
type_=sqlmodel.sql.sqltypes.AutoString(length=8192),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'information',
|
||||
existing_type=sa.VARCHAR(length=1024),
|
||||
type_=sqlmodel.sql.sqltypes.AutoString(length=8192),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'contant',
|
||||
existing_type=sa.VARCHAR(length=1024),
|
||||
type_=sqlmodel.sql.sqltypes.AutoString(length=8192),
|
||||
existing_nullable=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('course', 'contant',
|
||||
existing_type=sqlmodel.sql.sqltypes.AutoString(length=8192),
|
||||
type_=sa.VARCHAR(length=1024),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'information',
|
||||
existing_type=sqlmodel.sql.sqltypes.AutoString(length=8192),
|
||||
type_=sa.VARCHAR(length=1024),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'long_description',
|
||||
existing_type=sqlmodel.sql.sqltypes.AutoString(length=8192),
|
||||
type_=sa.VARCHAR(length=2048),
|
||||
existing_nullable=False)
|
||||
# ### end Alembic commands ###
|
@@ -0,0 +1,67 @@
|
||||
"""update course string max length
|
||||
|
||||
Revision ID: 8e38378fd2f3
|
||||
Revises: 01b284ceabf9
|
||||
Create Date: 2024-10-01 13:11:16.073772
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel.sql.sqltypes
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '8e38378fd2f3'
|
||||
down_revision = '01b284ceabf9'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('course', 'sort_description',
|
||||
existing_type=sa.VARCHAR(length=1024),
|
||||
type_=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'long_description',
|
||||
existing_type=sa.VARCHAR(length=8192),
|
||||
type_=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'information',
|
||||
existing_type=sa.VARCHAR(length=8192),
|
||||
type_=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'contant',
|
||||
existing_type=sa.VARCHAR(length=8192),
|
||||
type_=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'remark',
|
||||
existing_type=sa.VARCHAR(length=512),
|
||||
type_=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
existing_nullable=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('course', 'remark',
|
||||
existing_type=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
type_=sa.VARCHAR(length=512),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'contant',
|
||||
existing_type=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
type_=sa.VARCHAR(length=8192),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'information',
|
||||
existing_type=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
type_=sa.VARCHAR(length=8192),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'long_description',
|
||||
existing_type=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
type_=sa.VARCHAR(length=8192),
|
||||
existing_nullable=False)
|
||||
op.alter_column('course', 'sort_description',
|
||||
existing_type=sqlmodel.sql.sqltypes.AutoString(length=32768),
|
||||
type_=sa.VARCHAR(length=1024),
|
||||
existing_nullable=False)
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user