Commit existing codebase
This commit is contained in:
commit
49bc902bb9
24 changed files with 1208 additions and 0 deletions
41
app/migrations/versions/646ae6f3e17a_initial.py
Normal file
41
app/migrations/versions/646ae6f3e17a_initial.py
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
"""Initial
|
||||
|
||||
Revision ID: 646ae6f3e17a
|
||||
Revises:
|
||||
Create Date: 2021-02-25 00:59:54.287382
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '646ae6f3e17a'
|
||||
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.Integer(), nullable=False),
|
||||
sa.Column('username', sa.String(length=32), nullable=False),
|
||||
sa.Column('email', sa.String(), nullable=False),
|
||||
sa.Column('given_name', sa.String(length=32), nullable=False),
|
||||
sa.Column('family_name', sa.String(length=32), nullable=True),
|
||||
sa.Column('sex', sa.Enum('NOT_KNOWN', 'MALE', 'FEMALE', 'NOT_APPLICABLE', name='usersex'), nullable=False),
|
||||
sa.Column('birthdate', sa.Date(), nullable=True),
|
||||
sa.Column('password', sa.String(), nullable=False),
|
||||
sa.Column('creation_date', sa.DateTime(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('email'),
|
||||
sa.UniqueConstraint('username')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('users')
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue