def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('graph',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('sketch_id', sa.Integer(), nullable=True),
    sa.Column('name', sa.UnicodeText(), nullable=True),
    sa.Column('description', sa.UnicodeText(), nullable=True),
    sa.Column('graph_config', sa.UnicodeText(), nullable=True),
    sa.Column('graph_elements', sa.UnicodeText(), nullable=True),
    sa.Column('graph_thumbnail', sa.UnicodeText(), nullable=True),
    sa.Column('num_nodes', sa.Integer(), nullable=True),
    sa.Column('num_edges', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['sketch_id'], ['sketch.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('graphcache',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('sketch_id', sa.Integer(), nullable=True),
    sa.Column('graph_plugin', sa.UnicodeText(), nullable=True),
    sa.Column('graph_config', sa.UnicodeText(), nullable=True),
    sa.Column('graph_elements', sa.UnicodeText(), nullable=True),
    sa.Column('num_nodes', sa.Integer(), nullable=True),
    sa.Column('num_edges', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['sketch_id'], ['sketch.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('graph_comment',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('comment', sa.UnicodeText(), nullable=True),
    sa.Column('parent_id', sa.Integer(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['parent_id'], ['graph.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('graph_label',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('label', sa.Unicode(length=255), nullable=True),
    sa.Column('parent_id', sa.Integer(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['parent_id'], ['graph.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###