Skip to content

Commit

Permalink
fix(migration): make executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradip-p committed Jul 13, 2024
1 parent 625e437 commit f69bdd3
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/backend/app/migrations/versions/acee47666167_refine_field_name.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,28 @@
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision: str = 'acee47666167'
down_revision: Union[str, None] = '88ae62ec8876'
revision: str = "acee47666167"
down_revision: Union[str, None] = "88ae62ec8876"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('projects', sa.Column('created_at', sa.DateTime(), nullable=False))
op.add_column('projects', sa.Column('deadline_at', sa.DateTime(), nullable=True))
op.drop_column('projects', 'created')
op.add_column("projects", sa.Column("created_at", sa.DateTime(), nullable=False))
op.add_column("projects", sa.Column("deadline_at", sa.DateTime(), nullable=True))
op.drop_column("projects", "created")
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
#op.add_column('projects', sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=False))
op.drop_column('projects', 'deadline_at')
op.drop_column('projects', 'created_at')
op.add_column(
"projects",
sa.Column(
"created", postgresql.TIMESTAMP(), autoincrement=False, nullable=False
),
)
op.drop_column("projects", "deadline_at")
op.drop_column("projects", "created_at")
# ### end Alembic commands ###

0 comments on commit f69bdd3

Please sign in to comment.