forked from kompetenzinventar/ki-backend
added model and migration for resume
This commit is contained in:
35
migrations/versions/6be5073423b4_add_resume.py
Normal file
35
migrations/versions/6be5073423b4_add_resume.py
Normal file
@ -0,0 +1,35 @@
|
||||
"""add resume
|
||||
|
||||
Revision ID: 6be5073423b4
|
||||
Revises: b5023977cbda
|
||||
Create Date: 2024-08-30 18:18:14.555874
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '6be5073423b4'
|
||||
down_revision = 'b5023977cbda'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('resume',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('user_id', sa.Integer(), nullable=True),
|
||||
sa.Column('label', sa.String(length=50), nullable=True),
|
||||
sa.Column('data', sa.JSON(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ondelete='CASCADE'),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('resume')
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user