Commit ef08aad6 authored by sim's avatar sim

Migration: remove legacy table nodes_hyperdata

parent e6a6f379
"""Drop legacy table nodes_hyperdata
Revision ID: e78fd042f13c
Revises: 8fced8397139
Create Date: 2018-03-29 15:22:55.643556
"""
from alembic import op
import sqlalchemy as sa
import gargantext
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'e78fd042f13c'
down_revision = '8fced8397139'
branch_labels = None
depends_on = None
def upgrade():
op.drop_table('nodes_hyperdata')
def downgrade():
op.create_table('nodes_hyperdata',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('node_id', sa.Integer(), nullable=True),
sa.Column('key', gargantext.models.hyperdata.HyperdataKey(), nullable=True),
sa.Column('value_int', sa.Integer(), nullable=True),
sa.Column('value_flt', postgresql.DOUBLE_PRECISION(), nullable=True),
sa.Column('value_utc', sa.DateTime(timezone=True), nullable=True),
sa.Column('value_str', sa.String(length=255), nullable=True),
sa.Column('value_txt', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['node_id'], ['nodes.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment