repo stringclasses 454
values | file_path stringlengths 5 201 | extension stringclasses 1
value | content stringlengths 8 509k | num_lines int64 3 16.9k | size_bytes int64 8 511k |
|---|---|---|---|---|---|
onyx | backend/alembic/versions/3d1cca026fe8_add_oauth_config_and_user_tokens.py | .py | """add_oauth_config_and_user_tokens
Revision ID: 3d1cca026fe8
Revises: c8a93a2af083
Create Date: 2025-10-21 13:27:34.274721
"""
from alembic import op
import fastapi_users_db_sqlalchemy
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "3d1cca026f... | 122 | 3,786 |
onyx | backend/alembic/versions/39287906b97a_external_app_action_policies.py | .py | """external app action policies
Revision ID: 39287906b97a
Revises: 366c05b6f485
Create Date: 2026-05-26 12:01:05.260678
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "39287906b97a"
down_revision = "366c05b6f485"
branch_labels = None
depends_on = None
def u... | 54 | 1,381 |
onyx | backend/alembic/versions/7f5b159041be_skill_built_in_id_discriminator.py | .py | """skill_built_in_id_discriminator
Revision ID: 7f5b159041be
Revises: db87b27e93ef
Create Date: 2026-05-20 16:05:14.948817
Adds a discriminator column ``built_in_skill_id`` so a single ``skill``
row can describe either a built-in (definition lives on disk under
``SKILLS_TEMPLATE_PATH``) or a custom (bundle blob in Fi... | 252 | 9,646 |
onyx | backend/alembic/versions/d09fc20a3c66_seed_builtin_tools.py | .py | """seed_builtin_tools
Revision ID: d09fc20a3c66
Revises: b7ec9b5b505f
Create Date: 2025-09-09 19:32:16.824373
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "d09fc20a3c66"
down_revision = "b7ec9b5b505f"
branch_labels = None
depends_on = None
# Tool definitio... | 131 | 4,611 |
onyx | backend/alembic/versions/65bc6e0f8500_remove_kg_subtype_from_db.py | .py | """remove kg subtype from db
Revision ID: 65bc6e0f8500
Revises: cec7ec36c505
Create Date: 2025-06-13 10:04:27.705976
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "65bc6e0f8500"
down_revision = "cec7ec36c505"
branch_labels = None
depends_on = None
def upgra... | 41 | 1,103 |
onyx | backend/alembic/versions/c0aab6edb6dd_delete_workspace.py | .py | """delete workspace
Revision ID: c0aab6edb6dd
Revises: 35e518e0ddf4
Create Date: 2024-12-17 14:37:07.660631
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "c0aab6edb6dd"
down_revision = "35e518e0ddf4"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.execute("""
... | 83 | 2,562 |
onyx | backend/alembic/versions/f6b0949ea33d_copy_telemetry_secrets_to_encrypted_kv.py | .py | """add encrypted key value store with telemetry secrets
Revision ID: f6b0949ea33d
Revises: 8c8ff08f8035
Create Date: 2026-07-02 18:36:07.598687
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import insert as pg_insert
# revision identifiers, used by Alembic.
revision = "f6b0... | 62 | 1,728 |
onyx | backend/alembic/versions/c7bc8cc2921d_drop_unused_kg_indexes.py | .py | """drop_unused_kg_indexes
Revision ID: c7bc8cc2921d
Revises: b02d7b35e48b
Create Date: 2026-05-26 13:00:00.000000
Drop unused secondary indexes from KG tables and the redundant index
on ``chunk_stats.id`` (already covered by its primary key).
These secondary indexes have no observed usage and are not used by
current... | 303 | 11,702 |
onyx | backend/alembic/versions/96a5702df6aa_mcp_tool_enabled.py | .py | """mcp_tool_enabled
Revision ID: 96a5702df6aa
Revises: 40926a4dab77
Create Date: 2025-10-09 12:10:21.733097
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "96a5702df6aa"
down_revision = "40926a4dab77"
branch_labels = None
depends_on = None
DELETE_DISABLED_TO... | 45 | 1,002 |
onyx | backend/alembic/versions/80696cf850ae_add_chat_session_to_query_event.py | .py | """Add chat session to query_event
Revision ID: 80696cf850ae
Revises: 15326fcec57e
Create Date: 2023-11-26 02:38:35.008070
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "80696cf850ae"
down_revision = "15326fcec57e"
branch_labels: None = None
depends_on: None ... | 38 | 820 |
onyx | backend/alembic/versions/a01bf2971c5d_update_default_tool_descriptions.py | .py | """update_default_tool_descriptions
Revision ID: a01bf2971c5d
Revises: 87c52ec39f84
Create Date: 2025-12-16 15:21:25.656375
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "a01bf2971c5d"
down_revision = "18b5b2524446"
branch_labels = None
depends_on = None
# n... | 54 | 1,784 |
onyx | backend/alembic/versions/01f8e6d95a33_populate_flow_mapping_data.py | .py | """Populate flow mapping data
Revision ID: 01f8e6d95a33
Revises: d5c86e2c6dc6
Create Date: 2026-01-31 17:37:10.485558
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "01f8e6d95a33"
down_revision = "d5c86e2c6dc6"
branch_labels = None
depends_on = None
def upgrade() -> None:
# Add... | 102 | 3,435 |
onyx | backend/alembic/versions/8b5ce697290e_add_discord_bot_tables.py | .py | """Add Discord bot tables
Revision ID: 8b5ce697290e
Revises: a1b2c3d4e5f7
Create Date: 2025-01-14
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "8b5ce697290e"
down_revision = "a1b2c3d4e5f7"
branch_labels: None = None
depends_on: None = None
def upgrade() ->... | 117 | 3,440 |
onyx | backend/alembic/versions/6fc7886d665d_make_categories_labels_and_many_to_many.py | .py | """make categories labels and many to many
Revision ID: 6fc7886d665d
Revises: 3c6531f32351
Create Date: 2025-01-13 18:12:18.029112
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "6fc7886d665d"
down_revision = "3c6531f32351"
branch_labels = None
depends_on = No... | 77 | 2,169 |
onyx | backend/alembic/versions/a4c9d2e7f1b8_skill_sharing_permissions.py | .py | """skill sharing permissions
Revision ID: a4c9d2e7f1b8
Revises: 99c855a8f2a1
Create Date: 2026-06-30
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "a4c9d2e7f1b8"
down_revision = "99c855a8f2a1"
branch_labels = None
de... | 66 | 1,978 |
onyx | backend/alembic/versions/4ee1287bd26a_add_multiple_slack_bot_support.py | .py | """add_multiple_slack_bot_support
Revision ID: 4ee1287bd26a
Revises: 47e5bef3a1d7
Create Date: 2024-11-06 13:15:53.302644
"""
from typing import cast
from alembic import op
import sqlalchemy as sa
from sqlalchemy.orm import Session
from onyx.key_value_store.factory import get_kv_store
from onyx.db.models import Slac... | 263 | 9,093 |
onyx | backend/alembic/versions/631fd2504136_add_approx_chunk_count_in_vespa_to_.py | .py | """add approx_chunk_count_in_vespa to opensearch tenant migration
Revision ID: 631fd2504136
Revises: c7f2e1b4a9d3
Create Date: 2026-02-18 21:07:52.831215
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "631fd2504136"
down_revision = "c7f2e1b4a9d3"
branch_labels... | 32 | 683 |
onyx | backend/alembic/versions/90b409d06e50_add_chat_compression_fields.py | .py | """add_chat_compression_fields
Revision ID: 90b409d06e50
Revises: f220515df7b4
Create Date: 2026-01-26 09:13:09.635427
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "90b409d06e50"
down_revision = "f220515df7b4"
branch_labels = None
depends_on = None
def upg... | 36 | 895 |
onyx | backend/alembic/versions/bd7c3bf8beba_migrate_agent_responses_to_research_.py | .py | """migrate_agent_sub_questions_to_research_iterations
Revision ID: bd7c3bf8beba
Revises: f8a9b2c3d4e5
Create Date: 2025-08-18 11:33:27.098287
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "bd7c3bf8beba"
down_revision = "f8a9b2c3d4e5"
branch_labels = None
depe... | 133 | 4,533 |
onyx | backend/alembic/versions/f1c6478c3fd8_add_pre_defined_feedback.py | .py | """Add pre-defined feedback
Revision ID: f1c6478c3fd8
Revises: 643a84a42a33
Create Date: 2024-05-09 18:11:49.210667
"""
from alembic import op
import sqlalchemy as sa
revision = "f1c6478c3fd8"
down_revision = "643a84a42a33"
branch_labels: None = None
depends_on: None = None
def upgrade() -> None:
op.add_colum... | 27 | 510 |
onyx | backend/alembic/versions/b7bcc991d722_assign_users_to_default_groups.py | .py | """assign_users_to_default_groups
Revision ID: b7bcc991d722
Revises: 03d085c5c38d
Create Date: 2026-03-25 16:30:39.529301
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import insert as pg_insert
# revision identifiers, used by Alembic.
revision = "b7bcc991d722"
down_revision... | 125 | 4,016 |
onyx | backend/alembic/versions/52a219fb5233_add_last_synced_and_last_modified_to_document_table.py | .py | """Add last synced and last modified to document table
Revision ID: 52a219fb5233
Revises: f7e58d357687
Create Date: 2024-08-28 17:40:46.077470
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import func
# revision identifiers, used by Alembic.
revision = "52a219fb5233"
down_revision = "f7e58d... | 66 | 1,725 |
onyx | backend/alembic/versions/15326fcec57e_introduce_onyx_apis.py | .py | """Introduce Onyx APIs
Revision ID: 15326fcec57e
Revises: 77d07dffae64
Create Date: 2023-11-11 20:51:24.228999
"""
from alembic import op
import sqlalchemy as sa
from onyx.configs.constants import DocumentSource
# revision identifiers, used by Alembic.
revision = "15326fcec57e"
down_revision = "77d07dffae64"
branc... | 39 | 943 |
onyx | backend/alembic/versions/57122d037335_add_python_tool_on_default.py | .py | """add python tool on default
Revision ID: 57122d037335
Revises: c0c937d5c9e5
Create Date: 2026-02-27 10:10:40.124925
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "57122d037335"
down_revision = "c0c937d5c9e5"
branch_labels = None
depends_on = None
PYTHON_T... | 65 | 1,326 |
onyx | backend/alembic/versions/5c3dca366b35_backend_driven_notification_details.py | .py | """backend driven notification details
Revision ID: 5c3dca366b35
Revises: 9087b548dd69
Create Date: 2026-01-06 16:03:11.413724
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "5c3dca366b35"
down_revision = "9087b548dd69"
branch_labels = None
depends_on = None
... | 35 | 758 |
onyx | backend/alembic/versions/7da543f5672f_add_slackbotconfig_table.py | .py | """Add SlackBotConfig table
Revision ID: 7da543f5672f
Revises: febe9eaa0644
Create Date: 2023-09-24 16:34:17.526128
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "7da543f5672f"
down_revision = "febe9eaa0644"
branch_l... | 40 | 905 |
onyx | backend/alembic/versions/c9e2cd766c29_add_s3_file_store_table.py | .py | """modify_file_store_for_external_storage
Revision ID: c9e2cd766c29
Revises: 03bf8be6b53a
Create Date: 2025-06-13 14:02:09.867679
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.orm import Session
from sqlalchemy import text
from typing import cast
from botocore.exceptions import ClientError
fro... | 313 | 11,208 |
onyx | backend/alembic/versions/3c5e35aa9af0_polling_document_count.py | .py | """Polling Document Count
Revision ID: 3c5e35aa9af0
Revises: 27c6ecc08586
Create Date: 2023-06-14 23:45:51.760440
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "3c5e35aa9af0"
down_revision = "27c6ecc08586"
branch_labels: None = None
depends_on: None = None
... | 53 | 1,303 |
onyx | backend/alembic/versions/bc9e56f2fb96_polymorphic_gated_app.py | .py | """replace external-app approval targets with a polymorphic gated_app
The approval pipeline (per-action policy, approval rows, scheduled-task
pre-approvals) attributed a gated request to an ``external_app`` row. Introduce a
polymorphic ``gated_app`` identity table — one row per external app or MCP
server — and repoint... | 246 | 8,857 |
onyx | backend/alembic/versions/2cdeff6d8c93_set_built_in_to_default.py | .py | """set built in to default
Revision ID: 2cdeff6d8c93
Revises: f5437cc136c5
Create Date: 2025-02-11 14:57:51.308775
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "2cdeff6d8c93"
down_revision = "f5437cc136c5"
branch_labels = None
depends_on = None
def upgrade() -> None:
# Prior ... | 31 | 674 |
onyx | backend/alembic/versions/a4f23d6b71c8_add_llm_provider_persona_restrictions.py | .py | """add llm provider persona restrictions
Revision ID: a4f23d6b71c8
Revises: 5e1c073d48a3
Create Date: 2025-10-21 00:00:00.000000
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "a4f23d6b71c8"
down_revision = "5e1c073d48a3"
branch_labels = None
depends_on = None... | 61 | 1,648 |
onyx | backend/alembic/versions/173cae5bba26_port_config_store.py | .py | """Port Config Store
Revision ID: 173cae5bba26
Revises: e50154680a5c
Create Date: 2024-03-19 15:30:44.425436
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "173cae5bba26"
down_revision = "e50154680a5c"
branch_labels: ... | 31 | 679 |
onyx | backend/alembic/versions/79acd316403a_add_api_key_table.py | .py | """Add api_key table
Revision ID: 79acd316403a
Revises: 904e5138fffb
Create Date: 2024-01-11 17:56:37.934381
"""
from alembic import op
import fastapi_users_db_sqlalchemy
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "79acd316403a"
down_revision = "904e5138fffb"
branch_labels: None = N... | 50 | 1,242 |
onyx | backend/alembic/versions/febe9eaa0644_add_document_set_persona_relationship_.py | .py | """Add document_set / persona relationship table
Revision ID: febe9eaa0644
Revises: 57b53544726e
Create Date: 2023-09-24 13:06:24.018610
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "febe9eaa0644"
down_revision = "57b53544726e"
branch_labels: None = None
dep... | 38 | 903 |
onyx | backend/alembic/versions/be87a654d5af_persona_new_default_model_configuration_.py | .py | """Persona new default model configuration id column
Revision ID: be87a654d5af
Revises: e7f8a9b0c1d2
Create Date: 2026-01-30 11:14:17.306275
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "be87a654d5af"
down_revision = "e7f8a9b0c1d2"
branch_labels = None
depen... | 40 | 914 |
onyx | backend/alembic/versions/8e1ac4f39a9f_enable_contextual_retrieval.py | .py | """enable contextual retrieval
Revision ID: 8e1ac4f39a9f
Revises: 9aadf32dfeb4
Create Date: 2024-12-20 13:29:09.918661
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "8e1ac4f39a9f"
down_revision = "9aadf32dfeb4"
branch_labels = None
depends_on = None
def upg... | 51 | 1,119 |
onyx | backend/alembic/versions/c0fd6e4da83a_add_recent_assistants.py | .py | """add recent assistants
Revision ID: c0fd6e4da83a
Revises: b72ed7a5db0e
Create Date: 2024-11-03 17:28:54.916618
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "c0fd6e4da83a"
down_revision = "b72ed7a5db0e"
branch_labe... | 31 | 608 |
onyx | backend/alembic/versions/eec4fc85ef28_add_llm_custom_config_env_injection_to_.py | .py | """add llm_custom_config_env_injection to security_settings
Revision ID: eec4fc85ef28
Revises: 1e0a3e4226f7
Create Date: 2026-07-19 19:14:17.334151
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "eec4fc85ef28"
down_revision = "1e0a3e4226f7"
branch_labels = No... | 29 | 605 |
onyx | backend/alembic/versions/35e6853a51d5_server_default_chosen_assistants.py | .py | """server default chosen assistants
Revision ID: 35e6853a51d5
Revises: c99d76fcd298
Create Date: 2024-09-13 13:20:32.885317
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "35e6853a51d5"
down_revision = "c99d76fcd298"
... | 64 | 1,808 |
onyx | backend/alembic/versions/0ebb1d516877_add_ccpair_deletion_failure_message.py | .py | """add ccpair deletion failure message
Revision ID: 0ebb1d516877
Revises: 52a219fb5233
Create Date: 2024-09-10 15:03:48.233926
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "0ebb1d516877"
down_revision = "52a219fb5233"
branch_labels = None
depends_on = None
... | 28 | 584 |
onyx | backend/alembic/versions/12635f6655b7_drive_canonical_ids.py | .py | """drive-canonical-ids
Revision ID: 12635f6655b7
Revises: 58c50ef19f08
Create Date: 2025-06-20 14:44:54.241159
"""
from alembic import op
import sqlalchemy as sa
from urllib.parse import urlparse, urlunparse
from httpx import HTTPStatusError
import httpx
from onyx.db.search_settings import SearchSettings
from onyx.d... | 576 | 21,847 |
onyx | backend/alembic/versions/6a804aeb4830_duplicated_no_harm_user_file_migration.py | .py | """duplicated no-harm user file migration
Revision ID: 6a804aeb4830
Revises: 8e1ac4f39a9f
Create Date: 2025-04-01 07:26:10.539362
"""
# revision identifiers, used by Alembic.
revision = "6a804aeb4830"
down_revision = "8e1ac4f39a9f"
branch_labels = None
depends_on = None
# Leaving this around only because some peop... | 24 | 475 |
onyx | backend/alembic/versions/e91df4e935ef_private_personas_documentsets.py | .py | """Private Personas DocumentSets
Revision ID: e91df4e935ef
Revises: 91fd3b470d1a
Create Date: 2024-03-17 11:47:24.675881
"""
import fastapi_users_db_sqlalchemy
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "e91df4e935ef"
down_revision = "91fd3b470d1a"
branch_labe... | 120 | 3,322 |
onyx | backend/alembic/versions/977e834c1427_seed_default_groups.py | .py | """seed_default_groups
Revision ID: 977e834c1427
Revises: 8188861f4e92
Create Date: 2026-03-25 14:59:41.313091
"""
from typing import Any
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import insert as pg_insert
# revision identifiers, used by Alembic.
revision = "977e834c1427"
... | 139 | 4,060 |
onyx | backend/alembic/versions/46b7a812670f_fix_user__external_user_group_id_fk.py | .py | """fix_user__external_user_group_id_fk
Revision ID: 46b7a812670f
Revises: f32615f71aeb
Create Date: 2024-09-23 12:58:03.894038
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "46b7a812670f"
down_revision = "f32615f71aeb"
branch_labels = None
depends_on = None
def upgrade() -> None:
... | 48 | 1,193 |
onyx | backend/alembic/versions/0568ccf46a6b_add_thread_specific_model_selection.py | .py | """Add thread specific model selection
Revision ID: 0568ccf46a6b
Revises: e209dc5a8156
Create Date: 2024-06-19 14:25:36.376046
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "0568ccf46a6b"
down_revision = "e209dc5a8156"
branch_labels: None = None
depends_on: N... | 28 | 568 |
onyx | backend/alembic/versions/0cd424f32b1d_user_file_data_preparation_and_backfill.py | .py | """Migration 2: User file data preparation and backfill
Revision ID: 0cd424f32b1d
Revises: 9b66d3156fc6
Create Date: 2025-09-22 09:44:42.727034
This migration populates the new columns added in migration 1.
It prepares data for the UUID transition and relationship migration.
"""
from alembic import op
import sqlalch... | 365 | 13,536 |
onyx | backend/alembic/versions/175ea04c7087_add_user_preferences.py | .py | """add_user_preferences
Revision ID: 175ea04c7087
Revises: d56ffa94ca32
Create Date: 2026-02-04 18:16:24.830873
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "175ea04c7087"
down_revision = "d56ffa94ca32"
branch_labels = None
depends_on = None
def upgrade() ... | 28 | 509 |
onyx | backend/alembic/versions/e0ea2ae62e51_add_index_on_chat_session_user_id_and_.py | .py | """add index on chat_session user_id and time_updated
Revision ID: e0ea2ae62e51
Revises: c2cc933f0a40
Create Date: 2026-07-23 23:13:21.795575
Adds a composite btree index on (user_id, onyxbot_flow, time_updated DESC) to
back the chat-history sidebar query (get_chat_sessions_by_user), which filters
on user_id + onyxbo... | 86 | 3,408 |
onyx | backend/alembic/versions/f5437cc136c5_delete_non_search_assistants.py | .py | """delete non-search assistants
Revision ID: f5437cc136c5
Revises: eaa3b5593925
Create Date: 2025-02-04 16:17:15.677256
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "f5437cc136c5"
down_revision = "eaa3b5593925"
branch_labels = None
depends_on = None
def upgrade() -> None:
pas... | 50 | 1,421 |
onyx | backend/alembic/versions/b6d184cfdaf3_skills.py | .py | """skills
Revision ID: b6d184cfdaf3
Revises: 37b5864e9cff
Create Date: 2026-05-12 18:00:15.431797
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "b6d184cfdaf3"
down_revision = "37b5864e9cff"
branch_labels = None
depen... | 74 | 2,187 |
onyx | backend/alembic/versions/a44c4ebac3d6_add_file_size_to_file_record.py | .py | """add file_size to file_record
Revision ID: a44c4ebac3d6
Revises: 3debc2b55899
Create Date: 2026-08-03 10:36:19.529472
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "a44c4ebac3d6"
down_revision = "3debc2b55899"
branch_labels = None
depends_on = None
def u... | 39 | 873 |
onyx | backend/alembic/versions/4738e4b3bae1_pg_file_store.py | .py | """PG File Store
Revision ID: 4738e4b3bae1
Revises: e91df4e935ef
Create Date: 2024-03-20 18:53:32.461518
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "4738e4b3bae1"
down_revision = "e91df4e935ef"
branch_labels: None = None
depends_on: None = None
def upgra... | 30 | 610 |
onyx | backend/alembic/versions/8818cf73fa1a_drop_include_citations.py | .py | """drop include citations
Revision ID: 8818cf73fa1a
Revises: 7ed603b64d5a
Create Date: 2025-09-02 19:43:50.060680
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "8818cf73fa1a"
down_revision = "7ed603b64d5a"
branch_labels = None
depends_on = None
def upgrade(... | 39 | 854 |
onyx | backend/alembic/versions/f0ff4d3e69ac_rename_user_file_secondary_only_sync_.py | .py | """rename user_file secondary_only_sync_pending to secondary_reconcile_pending
Revision ID: f0ff4d3e69ac
Revises: e3e324f5d32c
Create Date: 2026-07-09 15:32:03.179317
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "f0ff4d3e69ac"
down_revision = "e3e324f5d32c"
branch_labels = None
de... | 42 | 1,203 |
onyx | backend/alembic/versions/b082fec533f0_make_last_attempt_status_nullable.py | .py | """Make 'last_attempt_status' nullable
Revision ID: b082fec533f0
Revises: df0c7ad8a076
Create Date: 2023-08-06 12:05:47.087325
"""
from alembic import op
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "b082fec533f0"
down_revision = "df0c7ad8a076"
branch_labels: None =... | 53 | 1,243 |
onyx | backend/alembic/versions/bc9771dccadf_create_usage_reports_table.py | .py | """create usage reports table
Revision ID: bc9771dccadf
Revises: 0568ccf46a6b
Create Date: 2024-06-18 10:04:26.800282
"""
from alembic import op
import sqlalchemy as sa
import fastapi_users_db_sqlalchemy
# revision identifiers, used by Alembic.
revision = "bc9771dccadf"
down_revision = "0568ccf46a6b"
branch_labels... | 53 | 1,339 |
onyx | backend/alembic/versions/2daa494a0851_add_group_sync_time.py | .py | """add-group-sync-time
Revision ID: 2daa494a0851
Revises: c0fd6e4da83a
Create Date: 2024-11-11 10:57:22.991157
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "2daa494a0851"
down_revision = "c0fd6e4da83a"
branch_labels = None
depends_on = None
def upgrade() -... | 32 | 640 |
onyx | backend/alembic/versions/ec3ec2eabf7b_index_from_beginning.py | .py | """Index From Beginning
Revision ID: ec3ec2eabf7b
Revises: dbaa756c2ccf
Create Date: 2024-02-06 22:03:28.098158
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "ec3ec2eabf7b"
down_revision = "dbaa756c2ccf"
branch_labels: None = None
depends_on: None = None
de... | 29 | 666 |
onyx | backend/alembic/versions/465f78d9b7f9_larger_access_tokens_for_oauth.py | .py | """Larger Access Tokens for OAUTH
Revision ID: 465f78d9b7f9
Revises: 3c5e35aa9af0
Create Date: 2023-07-18 17:33:40.365034
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "465f78d9b7f9"
down_revision = "3c5e35aa9af0"
branch_labels: None = None
depends_on: None =... | 25 | 531 |
onyx | backend/alembic/versions/8f43500ee275_add_index.py | .py | """add index
Revision ID: 8f43500ee275
Revises: da42808081e3
Create Date: 2025-02-24 17:35:33.072714
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "8f43500ee275"
down_revision = "da42808081e3"
branch_labels = None
depends_on = None
def upgrade() -> None:
# Create a basic index... | 33 | 766 |
onyx | backend/alembic/versions/475fcefe8826_add_name_to_api_key.py | .py | """Add name to api_key
Revision ID: 475fcefe8826
Revises: ecab2b3f1a3b
Create Date: 2024-04-11 11:05:18.414438
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "475fcefe8826"
down_revision = "ecab2b3f1a3b"
branch_labels: None = None
depends_on: None = None
def... | 25 | 481 |
onyx | backend/alembic/versions/98a5008d8711_agent_tracking.py | .py | """agent_tracking
Revision ID: 98a5008d8711
Revises: 2f80c6a2550f
Create Date: 2025-01-29 17:00:00.000001
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from sqlalchemy.dialects.postgresql import UUID
# revision identifiers, used by Alembic.
revision = "98a5008d8711"
d... | 109 | 3,533 |
onyx | backend/alembic/versions/9d2e7f1a4c58_add_port_orphan_candidate.py | .py | """add port_orphan_candidate
Revision ID: 9d2e7f1a4c58
Revises: b72c72cd6ef6
Create Date: 2026-07-06 00:00:00.000000
Tracks documents deleted while a reindex port is running so the port attempt can
sweep any that a racing create-only write resurrected into the target index.
"""
from alembic import op
import sqlalche... | 66 | 1,912 |
onyx | backend/alembic/versions/c7d1f0a4b8e2_add_doc_created_at_to_document.py | .py | """add doc_created_at to document
Persist the source creation time on the document row so the indexing scan can
detect when a newly-supplied doc_created_at must be propagated to the index
(via a metadata-only update, without re-embedding).
Revision ID: c7d1f0a4b8e2
Revises: f6b0949ea33d
Create Date: 2026-07-07 12:00:... | 32 | 747 |
onyx | backend/alembic/versions/df46c75b714e_add_default_vision_provider_to_llm_.py | .py | """add_default_vision_provider_to_llm_provider
Revision ID: df46c75b714e
Revises: 3934b1bc7b62
Create Date: 2025-03-11 16:20:19.038945
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "df46c75b714e"
down_revision = "3934b1bc7b62"
branch_labels = None
depends_on ... | 37 | 827 |
onyx | backend/alembic/versions/7bd55f264e1b_add_display_name_to_model_configuration.py | .py | """Add display_name to model_configuration
Revision ID: 7bd55f264e1b
Revises: e8f0d2a38171
Create Date: 2025-12-04
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "7bd55f264e1b"
down_revision = "e8f0d2a38171"
branch_labels = None
depends_on = None
def upgrade... | 28 | 536 |
onyx | backend/alembic/versions/582269841f06_add_granted_scopes_to_external_app_user_.py | .py | """add granted_scopes to external_app_user_credential
Adds a queryable, unencrypted column for the OAuth scopes a user actually
granted for an external app. Authorization metadata (not a secret), so it lives
alongside — not inside — the encrypted ``user_credentials`` blob.
Nullable: NULL distinguishes "no authoritati... | 42 | 1,146 |
onyx | backend/alembic/versions/db87b27e93ef_external_app_tables.py | .py | """External app tables
Revision ID: db87b27e93ef
Revises: 2c7f9d3a84a0
Create Date: 2026-05-12 14:07:05.057008
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "db87b27e93ef"
down_revision = "ea418a384b9d"
branch_labels... | 118 | 3,334 |
onyx | backend/alembic/versions/b7c2b63c4a03_add_background_reindex_enabled_field.py | .py | """add background_reindex_enabled field
Revision ID: b7c2b63c4a03
Revises: f11b408e39d3
Create Date: 2024-03-26 12:34:56.789012
"""
from alembic import op
import sqlalchemy as sa
from onyx.db.enums import EmbeddingPrecision
# revision identifiers, used by Alembic.
revision = "b7c2b63c4a03"
down_revision = "f11b408... | 56 | 1,454 |
onyx | backend/alembic/versions/ec85f2b3c544_remove_last_attempt_status_from_cc_pair.py | .py | """Remove Last Attempt Status from CC Pair
Revision ID: ec85f2b3c544
Revises: 3879338f8ba1
Create Date: 2024-05-23 21:39:46.126010
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "ec85f2b3c544"
down_revision = "70f00c45c0f2"
branch_labels: None = None
depends_o... | 33 | 671 |
onyx | backend/alembic/versions/2c7f9d3a84a0_add_pat_type_and_encrypted_pat.py | .py | """add pat_type and encrypted_pat
Revision ID: 2c7f9d3a84a0
Revises: 4ff2545411ad
Create Date: 2026-05-12 12:05:32.340868
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "2c7f9d3a84a0"
down_revision = "4ff2545411ad"
branch_labels = None
depends_on = None
def ... | 33 | 723 |
onyx | backend/alembic/versions/643a84a42a33_add_user_configured_names_to_llmprovider.py | .py | """Add user-configured names to LLMProvider
Revision ID: 643a84a42a33
Revises: 0a98909f2757
Create Date: 2024-05-07 14:54:55.493100
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "643a84a42a33"
down_revision = "0a98909f2757"
branch_labels: None = None
depends_... | 47 | 1,668 |
onyx | backend/alembic/versions/20f09b642ed0_backfill_write_chat_for_limited_service_.py | .py | """backfill write chat for limited service accounts
LIMITED service-account keys created before insert_api_key granted them
write:chat directly (#11763) have an empty effective_permissions column,
which locks them out of the scoped chat APIs. Backfill the grant
(write:chat implies read:chat at read time).
Revision ID... | 53 | 1,502 |
onyx | backend/alembic/versions/7ed603b64d5a_add_mcp_server_and_connection_config_.py | .py | """add_mcp_server_and_connection_config_models
Revision ID: 7ed603b64d5a
Revises: b329d00a9ea6
Create Date: 2025-07-28 17:35:59.900680
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from onyx.db.enums import MCPAuthenticationType
# revision identifiers, used by Alembic... | 250 | 7,711 |
onyx | backend/alembic/versions/114a638452db_add_default_app_mode_to_user.py | .py | """add default_app_mode to user
Revision ID: 114a638452db
Revises: feead2911109
Create Date: 2026-02-09 18:57:08.274640
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "114a638452db"
down_revision = "feead2911109"
branch_labels = None
depends_on = None
def up... | 33 | 602 |
onyx | backend/alembic/versions/e1392f05e840_added_input_prompts.py | .py | """Added input prompts
Revision ID: e1392f05e840
Revises: 08a1eda20fe1
Create Date: 2024-07-13 19:09:22.556224
"""
import fastapi_users_db_sqlalchemy
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "e1392f05e840"
down_revision = "08a1eda20fe1"
branch_labels: None ... | 59 | 1,565 |
onyx | backend/alembic/versions/c7f2e1b4a9d3_add_sharing_scope_to_build_session.py | .py | """add sharing_scope to build_session
Revision ID: c7f2e1b4a9d3
Revises: 19c0ccb01687
Create Date: 2026-02-17 12:00:00.000000
"""
from alembic import op
import sqlalchemy as sa
revision = "c7f2e1b4a9d3"
down_revision = "19c0ccb01687"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.add_column(... | 32 | 582 |
onyx | backend/alembic/versions/351faebd379d_add_curator_fields.py | .py | """Add curator fields
Revision ID: 351faebd379d
Revises: ee3f4b47fad5
Create Date: 2024-08-15 22:37:08.397052
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "351faebd379d"
down_revision = "ee3f4b47fad5"
branch_labels: None = None
depends_on: None = None
def ... | 92 | 2,687 |
onyx | backend/alembic/versions/3879338f8ba1_add_tool_table.py | .py | """Add tool table
Revision ID: 3879338f8ba1
Revises: f1c6478c3fd8
Create Date: 2024-05-11 16:11:23.718084
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "3879338f8ba1"
down_revision = "f1c6478c3fd8"
branch_labels: None = None
depends_on: None = None
def upgr... | 47 | 1,169 |
onyx | backend/alembic/versions/d8cdfee5df80_add_skipped_to_userfilestatus.py | .py | """add skipped to userfilestatus
Revision ID: d8cdfee5df80
Revises: 1d78c0ca7853
Create Date: 2026-04-01 10:47:12.593950
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "d8cdfee5df80"
down_revision = "1d78c0ca7853"
branch_labels = None
depends_on = None
TABLE... | 55 | 1,474 |
onyx | backend/alembic/versions/74379b447d4c_add_paste_as_tile_to_user.py | .py | """add paste_as_tile to user
Revision ID: 74379b447d4c
Revises: 31bd8c17325e
Create Date: 2026-04-23 18:30:42.452355
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "74379b447d4c"
down_revision = "31bd8c17325e"
branch_labels = None
depends_on = None
def upgra... | 30 | 558 |
onyx | backend/alembic/versions/abe7378b8217_add_indexing_trigger_to_cc_pair.py | .py | """add indexing trigger to cc_pair
Revision ID: abe7378b8217
Revises: 6d562f86c78b
Create Date: 2024-11-26 19:09:53.481171
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "abe7378b8217"
down_revision = "93560ba1b118"
branch_labels = None
depends_on = None
def... | 32 | 668 |
onyx | backend/alembic/versions/5d12a446f5c0_add_api_version_and_deployment_name_to_.py | .py | """add api_version and deployment_name to search settings
Revision ID: 5d12a446f5c0
Revises: e4334d5b33ba
Create Date: 2024-10-08 15:56:07.975636
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "5d12a446f5c0"
down_revision = "e4334d5b33ba"
branch_labels = None
... | 31 | 726 |
onyx | backend/alembic/versions/9c54986124c6_add_scim_tables.py | .py | """add_scim_tables
Revision ID: 9c54986124c6
Revises: b51c6844d1df
Create Date: 2026-02-12 20:29:47.448614
"""
from alembic import op
import fastapi_users_db_sqlalchemy
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "9c54986124c6"
down_revision = "b51c6844d1df"
branch_labels = None
depe... | 125 | 3,709 |
onyx | backend/alembic/versions/37b5864e9cff_dalle3_deprecation.py | .py | """dalle3 deprecation
Revision ID: 37b5864e9cff
Revises: 2c7f9d3a84a0
Create Date: 2026-05-12 10:29:16.985208
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "37b5864e9cff"
down_revision = "2c7f9d3a84a0"
branch_labels = None
depends_on = None
_DEPRECATED_IMAG... | 80 | 2,369 |
onyx | backend/alembic/versions/7f2a3b9c1d4e_add_tracing_provider_config.py | .py | """add tracing provider config
Revision ID: 7f2a3b9c1d4e
Revises: 8c1d4f6a2e9b
Create Date: 2026-06-29 12:00:00.000000
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "7f2a3b9c1d4e"
down_revision = "8c1d4f6a2e9b"
bran... | 52 | 1,495 |
onyx | backend/alembic/versions/d61e513bef0a_add_total_docs_for_index_attempt.py | .py | """Add Total Docs for Index Attempt
Revision ID: d61e513bef0a
Revises: 46625e4745d4
Create Date: 2023-10-27 23:02:43.369964
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "d61e513bef0a"
down_revision = "46625e4745d4"
branch_labels: None = None
depends_on: None... | 34 | 772 |
onyx | backend/alembic/versions/a7c3e2b1d4f8_remove_multilingual_expansion_from_search_settings.py | .py | """remove multilingual_expansion from search_settings
Revision ID: a7c3e2b1d4f8
Revises: 856bcbe14d79
Create Date: 2026-04-16
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "a7c3e2b1d4f8"
down_revision = "856bcbe14d79... | 34 | 713 |
onyx | backend/alembic/versions/2a391f840e85_add_last_refreshed_at_mcp_server.py | .py | """add last refreshed at mcp server
Revision ID: 2a391f840e85
Revises: 4cebcbc9b2ae
Create Date: 2025-12-06 15:19:59.766066
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembi.
revision = "2a391f840e85"
down_revision = "4cebcbc9b2ae"
branch_labels = None
depends_on = None
def... | 28 | 551 |
onyx | backend/alembic/versions/f8048443da9e_add_notification_severity.py | .py | """add notification severity
Revision ID: f8048443da9e
Revises: 8d1297b43210
Create Date: 2026-08-13 15:22:27.752583
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "f8048443da9e"
down_revision = "8d1297b43210"
branch_labels = None
depends_on = None
def upgra... | 59 | 1,550 |
onyx | backend/alembic/versions/50b683a8295c_add_additional_retrieval_controls_to_.py | .py | """Add additional retrieval controls to Persona
Revision ID: 50b683a8295c
Revises: 7da0ae5ad583
Create Date: 2023-11-27 17:23:29.668422
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "50b683a8295c"
down_revision = "7da0ae5ad583"
branch_labels: None = None
depe... | 30 | 701 |
onyx | backend/alembic/versions/3c6531f32351_add_back_input_prompts.py | .py | """add back input prompts
Revision ID: 3c6531f32351
Revises: aeda5f2df4f6
Create Date: 2025-01-13 12:49:51.705235
"""
from alembic import op
import sqlalchemy as sa
import fastapi_users_db_sqlalchemy
# revision identifiers, used by Alembic.
revision = "3c6531f32351"
down_revision = "aeda5f2df4f6"
branch_labels = No... | 61 | 1,677 |
onyx | backend/alembic/versions/3c9a65f1207f_seed_exa_provider_from_env.py | .py | """seed_exa_provider_from_env
Revision ID: 3c9a65f1207f
Revises: 1f2a3b4c5d6e
Create Date: 2025-11-20 19:18:00.000000
"""
from __future__ import annotations
import os
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from dotenv import load_dotenv, find_dotenv
from onyx.uti... | 90 | 2,118 |
onyx | backend/alembic/versions/7f726bad5367_slack_followup.py | .py | """Slack Followup
Revision ID: 7f726bad5367
Revises: 79acd316403a
Create Date: 2024-01-15 00:19:55.991224
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "7f726bad5367"
down_revision = "79acd316403a"
branch_labels: None = None
depends_on: None = None
def upgr... | 28 | 538 |
onyx | backend/alembic/versions/f11b408e39d3_force_lowercase_all_users.py | .py | """force lowercase all users
Revision ID: f11b408e39d3
Revises: 3bd4c84fe72f
Create Date: 2025-02-26 17:04:55.683500
"""
# revision identifiers, used by Alembic.
revision = "f11b408e39d3"
down_revision = "3bd4c84fe72f"
branch_labels = None
depends_on = None
def upgrade() -> None:
# 1) Convert all existing user... | 34 | 775 |
onyx | backend/alembic/versions/e3e324f5d32c_port_attempt_user_scope_and_userfile_.py | .py | """port_attempt_user_scope_and_userfile_secondary_pending
Revision ID: e3e324f5d32c
Revises: 9d2e7f1a4c58
Create Date: 2026-07-08 13:23:34.712903
Reindexing user-file port, phase 1 (additive, dark until a port-flow reindex runs):
make PortAttempt / PortOrphanCandidate scope-polymorphic (connector cc_pair OR user)
and... | 213 | 7,174 |
onyx | backend/alembic/versions/72aa7de2e5cf_make_processing_mode_default_all_caps.py | .py | """make processing mode default all caps
Revision ID: 72aa7de2e5cf
Revises: 2020d417ec84
Create Date: 2026-01-26 18:58:47.705253
This migration fixes the ProcessingMode enum value mismatch:
- SQLAlchemy's Enum with native_enum=False uses enum member NAMES as valid values
- The original migration stored lowercase VALU... | 43 | 1,340 |
onyx | backend/alembic/versions/989bc57562e4_seed_browser_built_in_skill.py | .py | """seed_browser_built_in_skill
Seeds the built-in ``browser`` skill row (drives the in-pod agent-browser via
the session-pinned ``browser`` wrapper). Mirrors the seeding in
7f5b159041be_skill_built_in_id_discriminator, but — per that migration's own
guidance — guards against a tenant's custom skill already owning the ... | 101 | 3,370 |
onyx | backend/alembic/versions/16c37a30adf2_user_file_relationship_migration.py | .py | """Migration 3: User file relationship migration
Revision ID: 16c37a30adf2
Revises: 0cd424f32b1d
Create Date: 2025-09-22 09:47:34.175596
This migration converts folder-based relationships to project-based relationships.
It migrates persona__user_folder to persona__user_file and populates project__user_file.
"""
from... | 254 | 9,347 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.