mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: create and delete assignment activities from UI
This commit is contained in:
parent
04c05e4f9a
commit
10e9be1d33
14 changed files with 358 additions and 14 deletions
|
|
@ -23,6 +23,9 @@ depends_on: Union[str, Sequence[str], None] = None
|
|||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('activity', sa.Column('published', sa.Boolean(), nullable=False, server_default=sa.true()))
|
||||
# If you need to rename columns instead of dropping them, use the rename_column command
|
||||
# For example, if we are changing the name 'published_version' to 'published', we would use:
|
||||
# op.alter_column('activity', 'published_version', new_column_name='published', existing_type=sa.Boolean())
|
||||
op.drop_column('activity', 'published_version')
|
||||
op.drop_column('activity', 'version')
|
||||
|
||||
|
|
@ -32,7 +35,6 @@ def upgrade() -> None:
|
|||
op.create_foreign_key('trail_org_id_fkey', 'trail', 'organization', ['org_id'], ['id'], ondelete='CASCADE')
|
||||
op.drop_constraint('trail_user_id_fkey', 'trail', type_='foreignkey')
|
||||
op.create_foreign_key('trail_user_id_fkey', 'trail', 'user', ['user_id'], ['id'], ondelete='CASCADE')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
|
|
@ -45,7 +47,8 @@ def downgrade() -> None:
|
|||
|
||||
op.add_column('assignmentusersubmission', sa.Column('assignment_user_uuid', sa.VARCHAR(), autoincrement=False, nullable=False))
|
||||
|
||||
op.add_column('activity', sa.Column('version', sa.INTEGER(), autoincrement=False, nullable=False , server_default=sa.text('1')))
|
||||
op.add_column('activity', sa.Column('published_version', sa.INTEGER(), autoincrement=False, nullable=False , server_default=sa.text('1')) )
|
||||
op.add_column('activity', sa.Column('version', sa.INTEGER(), autoincrement=False, nullable=False, server_default=sa.text('1')))
|
||||
op.add_column('activity', sa.Column('published_version', sa.INTEGER(), autoincrement=False, nullable=False, server_default=sa.text('1')))
|
||||
op.drop_column('activity', 'published')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue