Module: Gitlab::Database::PartitioningMigrationHelpers

Includes:
ForeignKeyHelpers, IndexHelpers, TableManagementHelpers
Defined in:
lib/gitlab/database/partitioning_migration_helpers.rb,
lib/gitlab/database/partitioning_migration_helpers/bulk_copy.rb,
lib/gitlab/database/partitioning_migration_helpers/index_helpers.rb,
lib/gitlab/database/partitioning_migration_helpers/foreign_key_helpers.rb,
lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb,
lib/gitlab/database/partitioning_migration_helpers/backfill_partitioned_table.rb

Defined Under Namespace

Modules: ForeignKeyHelpers, IndexHelpers, TableManagementHelpers Classes: BackfillPartitionedTable, BulkCopy

Constant Summary

Constants included from IndexHelpers

IndexHelpers::DuplicatedIndexesError, IndexHelpers::ERROR_SCOPE

Constants included from MigrationHelpers

MigrationHelpers::DEFAULT_TIMESTAMP_COLUMNS

Constants included from DynamicModelHelpers

DynamicModelHelpers::BATCH_SIZE

Constants included from Migrations::RedisHelpers

Migrations::RedisHelpers::SCAN_START_CURSOR

Constants included from Migrations::SidekiqHelpers

Migrations::SidekiqHelpers::DEFAULT_MAX_ATTEMPTS, Migrations::SidekiqHelpers::DEFAULT_TIMES_IN_A_ROW

Constants included from Migrations::ConstraintsHelpers

Migrations::ConstraintsHelpers::MAX_IDENTIFIER_NAME_LENGTH

Constants included from Migrations::BatchedBackgroundMigrationHelpers

Migrations::BatchedBackgroundMigrationHelpers::BATCH_CLASS_NAME, Migrations::BatchedBackgroundMigrationHelpers::BATCH_MIN_DELAY, Migrations::BatchedBackgroundMigrationHelpers::BATCH_MIN_VALUE, Migrations::BatchedBackgroundMigrationHelpers::BATCH_SIZE, Migrations::BatchedBackgroundMigrationHelpers::NonExistentMigrationError, Migrations::BatchedBackgroundMigrationHelpers::SUB_BATCH_SIZE

Constants included from Migrations::BackgroundMigrationHelpers

Migrations::BackgroundMigrationHelpers::BATCH_SIZE, Migrations::BackgroundMigrationHelpers::JOB_BUFFER_SIZE

Constants included from TableManagementHelpers

TableManagementHelpers::ALLOWED_TABLES, TableManagementHelpers::BATCH_INTERVAL, TableManagementHelpers::BATCH_SIZE, TableManagementHelpers::ERROR_SCOPE, TableManagementHelpers::MIGRATION, TableManagementHelpers::MIGRATION_CLASS_NAME, TableManagementHelpers::SUB_BATCH_SIZE

Constants included from MigrationHelpers::LooseForeignKeyHelpers

MigrationHelpers::LooseForeignKeyHelpers::DELETED_RECORDS_INSERT_FUNCTION_NAME

Constants included from ForeignKeyHelpers

ForeignKeyHelpers::ERROR_SCOPE

Method Summary

Methods included from IndexHelpers

#add_concurrent_partitioned_index, #find_duplicate_indexes, #indexes_by_definition_for_table, #remove_concurrent_partitioned_index_by_name, #rename_indexes_for_table

Methods included from SchemaHelpers

#assert_not_in_transaction_block, #create_comment, #create_trigger, #create_trigger_function, #drop_function, #drop_trigger, #function_exists?, #object_name, #tmp_table_name, #trigger_exists?

Methods included from MigrationHelpers

#add_concurrent_foreign_key, #add_concurrent_index, #add_primary_key_using_index, #add_sequence, #add_timestamps_with_timezone, #backfill_conversion_of_integer_to_bigint, #backfill_iids, #change_column_type_concurrently, #check_trigger_permissions!, #cleanup_concurrent_column_rename, #cleanup_concurrent_column_type_change, #column_for, #concurrent_foreign_key_name, #convert_to_bigint_column, #convert_to_type_column, #copy_foreign_keys, #copy_indexes, #create_or_update_plan_limit, #create_temporary_columns_and_triggers, #define_batchable_model, #drop_sequence, #each_batch, #each_batch_range, #false_value, #foreign_key_exists?, #foreign_keys_for, #index_exists_by_name?, #index_invalid?, #indexes_for, #initialize_conversion_of_integer_to_bigint, #install_rename_triggers, #partition?, #postgres_exists_by_name?, #remove_column_default, #remove_concurrent_index, #remove_concurrent_index_by_name, #remove_foreign_key_if_exists, #remove_foreign_key_without_error, #remove_rename_triggers, #remove_timestamps, #rename_column_concurrently, #rename_trigger_name, #replace_sql, #restore_conversion_of_integer_to_bigint, #revert_backfill_conversion_of_integer_to_bigint, #revert_initialize_conversion_of_integer_to_bigint, #swap_primary_key, #table_partitioned?, #true_value, #undo_change_column_type_concurrently, #undo_cleanup_concurrent_column_rename, #undo_cleanup_concurrent_column_type_change, #undo_rename_column_concurrently, #update_column_in_batches, #validate_foreign_key

Methods included from MigrationHelpers::WraparoundVacuumHelpers

#check_if_wraparound_in_progress

Methods included from AsyncConstraints::MigrationHelpers

#prepare_async_check_constraint_validation, #prepare_async_foreign_key_validation, #prepare_partitioned_async_foreign_key_validation, #unprepare_async_check_constraint_validation, #unprepare_async_foreign_key_validation, #unprepare_partitioned_async_foreign_key_validation

Methods included from AsyncIndexes::MigrationHelpers

#async_index_creation_available?, #prepare_async_index, #prepare_async_index_from_sql, #prepare_async_index_removal, #unprepare_async_index, #unprepare_async_index_by_name

Methods included from RenameTableHelpers

#finalize_table_rename, #rename_table_safely, #undo_finalize_table_rename, #undo_rename_table_safely

Methods included from DynamicModelHelpers

#define_batchable_model, #each_batch, #each_batch_range

Methods included from Migrations::RedisHelpers

#queue_redis_migration_job

Methods included from Migrations::SidekiqHelpers

#sidekiq_queue_length, #sidekiq_queue_migrate, #sidekiq_remove_jobs

Methods included from Migrations::ExtensionHelpers

#create_extension, #drop_extension

Methods included from Migrations::ConstraintsHelpers

#add_check_constraint, #add_not_null_constraint, #add_text_limit, #check_constraint_exists?, check_constraint_exists?, #check_constraint_name, #check_not_null_constraint_exists?, #check_text_limit_exists?, #copy_check_constraints, #drop_constraint, #remove_check_constraint, #remove_not_null_constraint, #remove_text_limit, #rename_constraint, #switch_constraint_names, #text_limit_name, #validate_check_constraint, #validate_check_constraint_name!, #validate_not_null_constraint, #validate_text_limit

Methods included from Migrations::TimeoutHelpers

#disable_statement_timeout

Methods included from Migrations::LockRetriesHelpers

#with_lock_retries

Methods included from Migrations::BatchedBackgroundMigrationHelpers

#delete_batched_background_migration, #ensure_batched_background_migration_is_finished, #finalize_batched_background_migration, #gitlab_schema_from_context, #queue_batched_background_migration

Methods included from Migrations::BackgroundMigrationHelpers

#delete_job_tracking, #delete_queued_jobs, #finalize_background_migration, #migrate_in, #queue_background_migration_jobs_by_range_at_intervals, #requeue_background_migration_jobs_by_range_at_intervals

Methods included from Migrations::ReestablishedConnectionStack

#with_restored_connection_stack

Methods included from TableManagementHelpers

#cleanup_partitioning_data_migration, #convert_table_to_first_list_partition, #create_hash_partitions, #create_trigger_to_sync_tables, #drop_nonpartitioned_archive_table, #drop_partitioned_table_for, #enqueue_partitioning_data_migration, #finalize_backfilling_partitioned_table, #partition_table_by_date, #prepare_constraint_for_list_partitioning, #replace_with_partitioned_table, #revert_converting_table_to_first_list_partition, #revert_preparing_constraint_for_list_partitioning, #rollback_replace_with_partitioned_table

Methods included from MigrationHelpers::LooseForeignKeyHelpers

#has_loose_foreign_key?, #track_record_deletions, #untrack_record_deletions

Methods included from ForeignKeyHelpers

#add_concurrent_partitioned_foreign_key, #validate_partitioned_foreign_key