Commit ccfb0d3c authored by sim's avatar sim

[FIX] Fix issue with Node.hyperdata index

parent 39666398
......@@ -14,7 +14,7 @@ TELL ALEMBIC TO NOT START FROM SCRATCH
# "upgrade head" command. If you don't want to do this, you can of course
# drop your database and really start from scratch.
alembic stamp 601e9d9baa4c
alembic stamp bedce47c9e34
UPGRADE TO LATEST DATABASE VERSION
......
"""Fix issue with Node.hyperdata index
Revision ID: bedce47c9e34
Revises: 08230100f262
Create Date: 2017-07-10 11:30:59.168190
"""
from alembic import op
import sqlalchemy as sa
import gargantext
# revision identifiers, used by Alembic.
revision = 'bedce47c9e34'
down_revision = '08230100f262'
branch_labels = None
depends_on = None
def upgrade():
op.drop_index('nodes_hyperdata_idx', table_name='nodes')
op.create_index('nodes_hyperdata_idx', 'nodes', ['hyperdata'], unique=False, postgresql_using="gin")
def downgrade():
# We won't unfix the bug when downgrading...
pass
......@@ -55,7 +55,7 @@ class Node(Base):
__tablename__ = 'nodes'
__table_args__ = (
Index('nodes_user_id_typename_parent_id_idx', 'user_id', 'typename', 'parent_id'),
Index('nodes_hyperdata_idx', 'hyperdata'))
Index('nodes_hyperdata_idx', 'hyperdata', postgresql_using='gin'))
id = Column(Integer, primary_key=True)
typename = Column(NodeType, index=True)
......
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