Spaces:
Running
Running
After making new migrations
Browse files
alembic/versions/b55dbab76bb4_making_some_changes_to_the_migrations.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Making some changes to the migrations
|
| 2 |
+
|
| 3 |
+
Revision ID: b55dbab76bb4
|
| 4 |
+
Revises: 5dceb6aede3b
|
| 5 |
+
Create Date: 2024-08-24 01:54:37.745661
|
| 6 |
+
|
| 7 |
+
"""
|
| 8 |
+
from typing import Sequence, Union
|
| 9 |
+
|
| 10 |
+
from alembic import op
|
| 11 |
+
import sqlalchemy as sa
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
# revision identifiers, used by Alembic.
|
| 15 |
+
revision: str = 'b55dbab76bb4'
|
| 16 |
+
down_revision: Union[str, None] = '5dceb6aede3b'
|
| 17 |
+
branch_labels: Union[str, Sequence[str], None] = None
|
| 18 |
+
depends_on: Union[str, Sequence[str], None] = None
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def upgrade() -> None:
|
| 22 |
+
# ### commands auto generated by Alembic - please adjust! ###
|
| 23 |
+
op.add_column('users', sa.Column('password', sa.String(), nullable=False))
|
| 24 |
+
op.drop_column('users', 'hashed_password')
|
| 25 |
+
# ### end Alembic commands ###
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def downgrade() -> None:
|
| 29 |
+
# ### commands auto generated by Alembic - please adjust! ###
|
| 30 |
+
op.add_column('users', sa.Column('hashed_password', sa.VARCHAR(), autoincrement=False, nullable=False))
|
| 31 |
+
op.drop_column('users', 'password')
|
| 32 |
+
# ### end Alembic commands ###
|