diff --git a/backend/app/alembic/versions/0fae792dfdd0_removed_index.py b/backend/app/alembic/versions/0fae792dfdd0_removed_index.py new file mode 100644 index 0000000..61fe7f6 --- /dev/null +++ b/backend/app/alembic/versions/0fae792dfdd0_removed_index.py @@ -0,0 +1,29 @@ +"""removed index + +Revision ID: 0fae792dfdd0 +Revises: 55b5303d6c3c +Create Date: 2025-01-22 11:14:14.543427 + +""" +from alembic import op +import sqlalchemy as sa +import sqlmodel.sql.sqltypes + + +# revision identifiers, used by Alembic. +revision = '0fae792dfdd0' +down_revision = '55b5303d6c3c' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('course', 'index') + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('course', sa.Column('index', sa.INTEGER(), autoincrement=False, nullable=False)) + # ### end Alembic commands ### diff --git a/backend/app/models.py b/backend/app/models.py index 07937dc..d6e34ec 100644 --- a/backend/app/models.py +++ b/backend/app/models.py @@ -236,7 +236,7 @@ class CourseBase(SQLModel): title: str = Field(max_length=255) sort_description: str = Field(max_length=32768) long_description: str = Field(max_length=32768) - index: int = Field(default=10) + #index: int = Field(default=10) information: str = Field(max_length=32768) contant: str = Field(max_length=32768) remark: str = Field(max_length=32768) @@ -265,7 +265,7 @@ class Course(CourseBase, table=True): class CoursePublic(CourseBase): id: uuid.UUID title: str - index: int + #index: int images: list["Image"] info_images: list["Info_Image"] schedule: list["Schedule"]