diff options
author | HombreLaser <sebastian-440@live.com> | 2023-12-21 19:33:01 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-12-21 19:33:01 -0600 |
commit | e6b8aa9076cf8e4e4a5184168d27f2604f6a3ccb (patch) | |
tree | 6d1e1b1ca9bbf69d8d7da5678399b2efb07cb1e7 /migrations | |
parent | fa3884af00320ff48d2b891303b0e42c411039a4 (diff) |
Diffstat (limited to 'migrations')
-rw-r--r-- | migrations/versions/31bf24732e3d_add_users.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/migrations/versions/31bf24732e3d_add_users.py b/migrations/versions/31bf24732e3d_add_users.py new file mode 100644 index 0000000..34383d9 --- /dev/null +++ b/migrations/versions/31bf24732e3d_add_users.py @@ -0,0 +1,36 @@ +"""Add Users + +Revision ID: 31bf24732e3d +Revises: +Create Date: 2023-12-21 19:20:51.840838 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '31bf24732e3d' +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('users', + sa.Column('id', sa.BigInteger(), nullable=False), + sa.Column('email', sa.String(), nullable=False), + sa.Column('first_name', sa.String(), nullable=False), + sa.Column('last_name', sa.String(), nullable=False), + sa.Column('role', sa.String(length=10), nullable=False), + sa.Column('created_at', sa.Date(), nullable=False), + sa.PrimaryKeyConstraint('id') + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table('users') + # ### end Alembic commands ### |