Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
ccfb0d3c
Commit
ccfb0d3c
authored
Jul 10, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Fix issue with Node.hyperdata index
parent
39666398
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
README
alembic/README
+1
-1
bedce47c9e34_fix_issue_with_node_hyperdata_index.py
...sions/bedce47c9e34_fix_issue_with_node_hyperdata_index.py
+27
-0
nodes.py
gargantext/models/nodes.py
+1
-1
No files found.
alembic/README
View file @
ccfb0d3c
...
...
@@ -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
...
...
alembic/versions/bedce47c9e34_fix_issue_with_node_hyperdata_index.py
0 → 100644
View file @
ccfb0d3c
"""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
gargantext/models/nodes.py
View file @
ccfb0d3c
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment