summaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-12-21 19:33:01 -0600
committerHombreLaser <sebastian-440@live.com>2023-12-21 19:33:01 -0600
commite6b8aa9076cf8e4e4a5184168d27f2604f6a3ccb (patch)
tree6d1e1b1ca9bbf69d8d7da5678399b2efb07cb1e7 /migrations
parentfa3884af00320ff48d2b891303b0e42c411039a4 (diff)
Add migrationsHEADmaster
Diffstat (limited to 'migrations')
-rw-r--r--migrations/versions/31bf24732e3d_add_users.py36
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 ###