-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support confluence single page only indexing (#2008)
* added index recursively checkbox * mypy fixes * added migration to not break existing connectors
- Loading branch information
1 parent
a54ea9f
commit e6a92aa
Showing
3 changed files
with
72 additions
and
20 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
backend/alembic/versions/43cbbb3f5e6a_rename_index_origin_to_index_recursively.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"""Rename index_origin to index_recursively | ||
Revision ID: 1d6ad76d1f37 | ||
Revises: e1392f05e840 | ||
Create Date: 2024-08-01 12:38:54.466081 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "1d6ad76d1f37" | ||
down_revision = "e1392f05e840" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.execute( | ||
""" | ||
UPDATE connector | ||
SET connector_specific_config = jsonb_set( | ||
connector_specific_config, | ||
'{index_recursively}', | ||
'true'::jsonb | ||
) - 'index_origin' | ||
WHERE connector_specific_config ? 'index_origin' | ||
""" | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.execute( | ||
""" | ||
UPDATE connector | ||
SET connector_specific_config = jsonb_set( | ||
connector_specific_config, | ||
'{index_origin}', | ||
connector_specific_config->'index_recursively' | ||
) - 'index_recursively' | ||
WHERE connector_specific_config ? 'index_recursively' | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters