diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /db | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) | |
download | gitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'db')
152 files changed, 13233 insertions, 159 deletions
diff --git a/db/fixtures/development/24_forks.rb b/db/fixtures/development/24_forks.rb index cb6dbb7504d..536d9f9e2ba 100644 --- a/db/fixtures/development/24_forks.rb +++ b/db/fixtures/development/24_forks.rb @@ -10,17 +10,30 @@ Sidekiq::Testing.inline! do # we use randomized approach (e.g. `Array#sample`). return unless source_project - fork_project = Projects::ForkService.new( - source_project, - user, - namespace: user.namespace, - skip_disk_validation: true - ).execute + Sidekiq::Worker.skipping_transaction_check do + fork_project = Projects::ForkService.new( + source_project, + user, + namespace: user.namespace, + skip_disk_validation: true + ).execute - if fork_project.valid? - print '.' - else - print 'F' + # Seed-Fu runs this entire fixture in a transaction, so the `after_commit` + # hook won't run until after the fixture is loaded. That is too late + # since the Sidekiq::Testing block has already exited. Force clearing + # the `after_commit` queue to ensure the job is run now. + fork_project.send(:_run_after_commit_queue) + fork_project.import_state.send(:_run_after_commit_queue) + + # Expire repository cache after import to ensure + # valid_repo? call below returns a correct answer + fork_project.repository.expire_all_method_caches + + if fork_project.valid? && fork_project.valid_repo? + print '.' + else + print 'F' + end end end end diff --git a/db/fixtures/development/26_packages.rb b/db/fixtures/development/26_packages.rb new file mode 100644 index 00000000000..6096fd8962a --- /dev/null +++ b/db/fixtures/development/26_packages.rb @@ -0,0 +1,159 @@ +# frozen_string_literal: true + +class Gitlab::Seeder::Packages + attr_reader :project + + def initialize(project) + @project = project + end + + def seed_packages(package_type) + send("seed_#{package_type}_packages") + end + + def seed_npm_packages + 5.times do |i| + name = "@#{@project.root_namespace.path}/npm_package_#{SecureRandom.hex}" + version = "1.12.#{i}" + + params = Gitlab::Json.parse(read_fixture_file('npm', 'payload.json') + .gsub('@root/npm-test', name) + .gsub('1.0.1', version)) + .with_indifferent_access + + ::Packages::Npm::CreatePackageService.new(project, project.owner, params).execute + + print '.' + end + end + + def seed_maven_packages + 5.times do |i| + name = "my/company/app/maven-app-#{i}" + version = "1.0.#{i}-SNAPSHOT" + + params = { + name: name, + version: version, + path: "#{name}/#{version}" + } + + pkg = ::Packages::Maven::CreatePackageService.new(project, project.owner, params).execute + + %w(maven-metadata.xml my-app-1.0-20180724.124855-1.pom my-app-1.0-20180724.124855-1.jar).each do |filename| + with_cloned_fixture_file('maven', filename) do |filepath| + file_params = { + file: UploadedFile.new(filepath, filename: filename), + file_name: filename, + file_sha1: '1234567890', + size: 100.kilobytes + } + ::Packages::CreatePackageFileService.new(pkg, file_params).execute + end + end + + print '.' + end + end + + def seed_conan_packages + 5.times do |i| + name = "my-conan-pkg-#{i}" + version = "2.0.#{i}" + + params = { + package_name: name, + package_version: version, + package_username: ::Packages::Conan::Metadatum.package_username_from(full_path: project.full_path), + package_channel: 'stable' + } + + pkg = ::Packages::Conan::CreatePackageService.new(project, project.owner, params).execute + + fixtures = { + 'recipe_files' => %w(conanfile.py conanmanifest.txt), + 'package_files' => %w(conanmanifest.txt conaninfo.txt conan_package.tgz) + } + + fixtures.each do |folder, filenames| + filenames.each do |filename| + with_cloned_fixture_file(File.join('conan', folder), filename) do |filepath| + file = UploadedFile.new(filepath, filename: filename) + file_params = { + file_name: filename, + 'file.sha1': '1234567890', + 'file.size': 100.kilobytes, + 'file.md5': '12345', + recipe_revision: '0', + package_revision: '0', + conan_package_reference: '123456789', + conan_file_type: :package_file + } + ::Packages::Conan::CreatePackageFileService.new(pkg, file, file_params).execute + end + end + end + + print '.' + end + end + + def seed_nuget_packages + 5.times do |i| + name = "MyNugetApp.Package#{i}" + version = "4.2.#{i}" + + pkg = ::Packages::Nuget::CreatePackageService.new(project, project.owner, {}).execute + # when using ::Packages::Nuget::CreatePackageService, packages have a fixed name and a fixed version. + pkg.update!(name: name, version: version) + + filename = 'package.nupkg' + with_cloned_fixture_file('nuget', filename) do |filepath| + file_params = { + file: UploadedFile.new(filepath, filename: filename), + file_name: filename, + file_sha1: '1234567890', + size: 100.kilobytes + } + ::Packages::CreatePackageFileService.new(pkg, file_params).execute + end + + print '.' + end + end + + private + + def read_fixture_file(package_type, file) + File.read(fixture_path(package_type, file)) + end + + def fixture_path(package_type, file) + Rails.root.join('spec', 'fixtures', 'packages', package_type, file) + end + + def with_cloned_fixture_file(package_type, file) + Dir.mktmpdir do |dirpath| + cloned_path = File.join(dirpath, file) + FileUtils.cp(fixture_path(package_type, file), cloned_path) + yield cloned_path + end + end +end + +Gitlab::Seeder.quiet do + flag = 'SEED_ALL_PACKAGE_TYPES' + + puts "Use the `#{flag}` environment variable to seed packages of all types." unless ENV[flag] + + package_types = ENV[flag] ? %i[npm maven conan nuget] : [:npm] + + Project.not_mass_generated.sample(5).each do |project| + puts "\nSeeding packages for the '#{project.full_path}' project" + seeder = Gitlab::Seeder::Packages.new(project) + + package_types.each do |package_type| + seeder.seed_packages(package_type) + end + end +end diff --git a/db/fixtures/development/27_product_analytics_events.rb b/db/fixtures/development/27_product_analytics_events.rb new file mode 100644 index 00000000000..19237afd8ea --- /dev/null +++ b/db/fixtures/development/27_product_analytics_events.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +Gitlab::Seeder.quiet do + # The data set takes approximately 2 minutes to load, + # so its put behind the flag. To seed this data use the flag and the filter: + # SEED_PRODUCT_ANALYTICS_EVENTS=1 FILTER=product_analytics_events rake db:seed_fu + flag = 'SEED_PRODUCT_ANALYTICS_EVENTS' + + if ENV[flag] + Project.all.sample(2).each do |project| + # Let's generate approx a week of events from now into the past with 1 minute step. + # To add some differentiation we add a random offset of up to 45 seconds. + 10000.times do |i| + dvce_created_tstamp = DateTime.now - i.minute - rand(45).seconds + + # Add a random delay to collector timestamp. Up to 2 seconds. + collector_tstamp = dvce_created_tstamp + rand(3).second + + ProductAnalyticsEvent.create!( + project_id: project.id, + platform: ["web", "mob", "mob", "app"].sample, + collector_tstamp: collector_tstamp, + dvce_created_tstamp: dvce_created_tstamp, + event: nil, + event_id: SecureRandom.uuid, + name_tracker: "sp", + v_tracker: "js-2.14.0", + v_collector: Gitlab::VERSION, + v_etl: Gitlab::VERSION, + domain_userid: SecureRandom.uuid, + domain_sessionidx: 4, + page_url: "#{project.web_url}/-/product_analytics/test", + page_title: 'Test page', + page_referrer: "#{project.web_url}/-/product_analytics/test", + br_lang: ["en-US", "en-US", "en-GB", "nl", "fi"].sample, # https://www.andiamo.co.uk/resources/iso-language-codes/ + br_features_pdf: true, + br_cookies: [true, true, true, false].sample, + br_colordepth: ["24", "24", "16", "8"].sample, + os_timezone: ["America/Los_Angeles", "America/Los_Angeles", "America/Lima", "Asia/Dubai", "Africa/Bangui"].sample, # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + doc_charset: ["UTF-8", "UTF-8", "UTF-8", "DOS", "EUC"].sample, + domain_sessionid: SecureRandom.uuid + ) + end + + unless Feature.enabled?(:product_analytics, project) + if Feature.enable(:product_analytics, project) + puts "Product analytics feature was enabled for #{project.full_path}" + end + end + + puts "10K events added to #{project.full_path}" + end + else + puts "Skipped. Use the `#{flag}` environment variable to enable." + end +end diff --git a/db/migrate/20190315191339_create_merge_request_assignees_table.rb b/db/migrate/20190315191339_create_merge_request_assignees_table.rb index dbd9ea3e35b..6fc4463f281 100644 --- a/db/migrate/20190315191339_create_merge_request_assignees_table.rb +++ b/db/migrate/20190315191339_create_merge_request_assignees_table.rb @@ -17,8 +17,6 @@ class CreateMergeRequestAssigneesTable < ActiveRecord::Migration[5.0] end def down - # rubocop:disable Migration/DropTable drop_table :merge_request_assignees - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20190722144316_create_milestone_releases_table.rb b/db/migrate/20190722144316_create_milestone_releases_table.rb index 911ca941a56..55878bcec41 100644 --- a/db/migrate/20190722144316_create_milestone_releases_table.rb +++ b/db/migrate/20190722144316_create_milestone_releases_table.rb @@ -15,8 +15,6 @@ class CreateMilestoneReleasesTable < ActiveRecord::Migration[5.2] end def down - # rubocop:disable Migration/DropTable drop_table :milestone_releases - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20190927055500_create_description_versions.rb b/db/migrate/20190927055500_create_description_versions.rb index 9046ebbc499..b3082533a6f 100644 --- a/db/migrate/20190927055500_create_description_versions.rb +++ b/db/migrate/20190927055500_create_description_versions.rb @@ -24,8 +24,6 @@ class CreateDescriptionVersions < ActiveRecord::Migration[5.2] def down remove_column :system_note_metadata, :description_version_id - # rubocop:disable Migration/DropTable drop_table :description_versions - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20191112212815_create_web_authn_table.rb b/db/migrate/20191112212815_create_web_authn_table.rb new file mode 100644 index 00000000000..72895f955df --- /dev/null +++ b/db/migrate/20191112212815_create_web_authn_table.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class CreateWebAuthnTable < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + # disable_ddl_transaction! + + # rubocop:disable Migration/AddLimitToTextColumns + # limits are added in subsequent migration + def change + create_table :webauthn_registrations do |t| + t.bigint :user_id, null: false, index: true + + t.bigint :counter, default: 0, null: false + t.timestamps_with_timezone + t.text :credential_xid, null: false, index: { unique: true } + t.text :name, null: false + # The length of the public key is determined by the device + # and not specified. Thus we can't set a limit + t.text :public_key, null: false # rubocop:disable Migration/AddLimitToTextColumns + end + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20191118053631_add_group_deletion_schedules.rb b/db/migrate/20191118053631_add_group_deletion_schedules.rb index bc18480e5b9..6f3ed27e156 100644 --- a/db/migrate/20191118053631_add_group_deletion_schedules.rb +++ b/db/migrate/20191118053631_add_group_deletion_schedules.rb @@ -23,8 +23,6 @@ class AddGroupDeletionSchedules < ActiveRecord::Migration[5.2] end def down - # rubocop:disable Migration/DropTable drop_table :group_deletion_schedules - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20191127151619_create_gitlab_subscription_histories.rb b/db/migrate/20191127151619_create_gitlab_subscription_histories.rb index db2617112a3..718f2c1b313 100644 --- a/db/migrate/20191127151619_create_gitlab_subscription_histories.rb +++ b/db/migrate/20191127151619_create_gitlab_subscription_histories.rb @@ -23,8 +23,6 @@ class CreateGitlabSubscriptionHistories < ActiveRecord::Migration[5.2] end def down - # rubocop:disable Migration/DropTable drop_table :gitlab_subscription_histories - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200214025454_add_canonical_emails.rb b/db/migrate/20200214025454_add_canonical_emails.rb index 70ab7208ade..0732d39169d 100644 --- a/db/migrate/20200214025454_add_canonical_emails.rb +++ b/db/migrate/20200214025454_add_canonical_emails.rb @@ -20,9 +20,7 @@ class AddCanonicalEmails < ActiveRecord::Migration[6.0] def down with_lock_retries do - # rubocop:disable Migration/DropTable drop_table(:user_canonical_emails) - # rubocop:enable Migration/DropTable end end end diff --git a/db/migrate/20200227165129_create_user_details.rb b/db/migrate/20200227165129_create_user_details.rb index 474dc357266..89258eadb9f 100644 --- a/db/migrate/20200227165129_create_user_details.rb +++ b/db/migrate/20200227165129_create_user_details.rb @@ -20,9 +20,7 @@ class CreateUserDetails < ActiveRecord::Migration[6.0] def down with_lock_retries do - # rubocop:disable Migration/DropTable drop_table :user_details - # rubocop:enable Migration/DropTable end end end diff --git a/db/migrate/20200229171700_create_custom_emojis.rb b/db/migrate/20200229171700_create_custom_emojis.rb new file mode 100644 index 00000000000..1a60d7c8a63 --- /dev/null +++ b/db/migrate/20200229171700_create_custom_emojis.rb @@ -0,0 +1,29 @@ +class CreateCustomEmojis < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + disable_ddl_transaction! + + def up + unless table_exists?(:custom_emoji) + create_table :custom_emoji do |t| + t.references :namespace, index: false, null: false, foreign_key: { on_delete: :cascade } + t.datetime_with_timezone :created_at, null: false + t.datetime_with_timezone :updated_at, null: false + t.text :name, null: false + t.text :file, null: false + end + end + + unless index_exists?(:custom_emoji, [:namespace_id, :name], unique: true) + add_index :custom_emoji, [:namespace_id, :name], unique: true + end + + add_text_limit(:custom_emoji, :name, 36) + add_text_limit(:custom_emoji, :file, 255) + end + + def down + drop_table :custom_emoji + end +end diff --git a/db/migrate/20200305020458_add_label_restore_table.rb b/db/migrate/20200305020458_add_label_restore_table.rb new file mode 100644 index 00000000000..a5809cfe14b --- /dev/null +++ b/db/migrate/20200305020458_add_label_restore_table.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +class AddLabelRestoreTable < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + # copy table + execute "CREATE TABLE #{backup_labels_table_name} (LIKE #{labels_table_name} INCLUDING ALL);" + + # make the primary key a real functioning one rather than incremental + execute "ALTER TABLE #{backup_labels_table_name} ALTER COLUMN ID DROP DEFAULT;" + + # add some fields that make changes trackable + execute "ALTER TABLE #{backup_labels_table_name} ADD COLUMN restore_action INTEGER;" + execute "ALTER TABLE #{backup_labels_table_name} ADD COLUMN new_title VARCHAR;" + end + + def down + drop_table backup_labels_table_name + end + + private + + def labels_table_name + :labels + end + + def backup_labels_table_name + :backup_labels + end +end diff --git a/db/migrate/20200305020459_add_label_restore_foreign_keys.rb b/db/migrate/20200305020459_add_label_restore_foreign_keys.rb new file mode 100644 index 00000000000..4b7c68cb20b --- /dev/null +++ b/db/migrate/20200305020459_add_label_restore_foreign_keys.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +class AddLabelRestoreForeignKeys < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + # create foreign keys + connection.foreign_keys(labels_table_name).each do |fk| + fk_options = fk.options + add_concurrent_foreign_key(backup_labels_table_name, fk.to_table, name: fk.name, column: fk_options[:column]) + end + end + + def down + connection.foreign_keys(backup_labels_table_name).each do |fk| + with_lock_retries do + remove_foreign_key backup_labels_table_name, name: fk.name + end + end + end + + private + + def labels_table_name + :labels + end + + def backup_labels_table_name + :backup_labels + end +end diff --git a/db/migrate/20200311093210_create_user_highest_roles.rb b/db/migrate/20200311093210_create_user_highest_roles.rb index df2b02b7d91..36007f196d1 100644 --- a/db/migrate/20200311093210_create_user_highest_roles.rb +++ b/db/migrate/20200311093210_create_user_highest_roles.rb @@ -19,9 +19,7 @@ class CreateUserHighestRoles < ActiveRecord::Migration[6.0] def down with_lock_retries do - # rubocop:disable Migration/DropTable drop_table :user_highest_roles - # rubocop:enable Migration/DropTable end end end diff --git a/db/migrate/20200326122700_create_diff_note_positions.rb b/db/migrate/20200326122700_create_diff_note_positions.rb index 6c558516471..d37f7fef078 100644 --- a/db/migrate/20200326122700_create_diff_note_positions.rb +++ b/db/migrate/20200326122700_create_diff_note_positions.rb @@ -30,8 +30,6 @@ class CreateDiffNotePositions < ActiveRecord::Migration[6.0] # rubocop:enable Migration/AddLimitToTextColumns def down - # rubocop:disable Migration/DropTable drop_table :diff_note_positions - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200330203837_recreate_ci_ref.rb b/db/migrate/20200330203837_recreate_ci_ref.rb index 5a7bede4dc8..734795f594f 100644 --- a/db/migrate/20200330203837_recreate_ci_ref.rb +++ b/db/migrate/20200330203837_recreate_ci_ref.rb @@ -25,9 +25,7 @@ class RecreateCiRef < ActiveRecord::Migration[6.0] def down with_lock_retries do - # rubocop:disable Migration/DropTable drop_table :ci_refs - # rubocop:enable Migration/DropTable create_table :ci_refs do |t| t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade }, type: :integer diff --git a/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb b/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb index 169c8602cab..6af8c6db939 100644 --- a/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb +++ b/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb @@ -16,9 +16,7 @@ class AddProjectComplianceFrameworkSettingsTable < ActiveRecord::Migration[6.0] def down with_lock_retries do - # rubocop:disable Migration/DropTable drop_table :project_compliance_framework_settings - # rubocop:enable Migration/DropTable end end end diff --git a/db/migrate/20200407182205_create_partitioned_foreign_keys.rb b/db/migrate/20200407182205_create_partitioned_foreign_keys.rb index 59e7d88b238..aca8116d2dd 100644 --- a/db/migrate/20200407182205_create_partitioned_foreign_keys.rb +++ b/db/migrate/20200407182205_create_partitioned_foreign_keys.rb @@ -26,8 +26,6 @@ class CreatePartitionedForeignKeys < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :partitioned_foreign_keys - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200407222647_create_project_repository_storage_moves.rb b/db/migrate/20200407222647_create_project_repository_storage_moves.rb index 98e44aa2fc6..402a1cdd4a6 100644 --- a/db/migrate/20200407222647_create_project_repository_storage_moves.rb +++ b/db/migrate/20200407222647_create_project_repository_storage_moves.rb @@ -26,8 +26,6 @@ class CreateProjectRepositoryStorageMoves < ActiveRecord::Migration[6.0] remove_check_constraint(:project_repository_storage_moves, 'project_repository_storage_moves_source_storage_name') remove_check_constraint(:project_repository_storage_moves, 'project_repository_storage_moves_destination_storage_name') - # rubocop:disable Migration/DropTable drop_table :project_repository_storage_moves - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200408125046_create_ci_freeze_periods.rb b/db/migrate/20200408125046_create_ci_freeze_periods.rb index 98f0e20b11b..42a385150b8 100644 --- a/db/migrate/20200408125046_create_ci_freeze_periods.rb +++ b/db/migrate/20200408125046_create_ci_freeze_periods.rb @@ -25,8 +25,6 @@ class CreateCiFreezePeriods < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :ci_freeze_periods - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200416005331_create_status_page_published_incidents.rb b/db/migrate/20200416005331_create_status_page_published_incidents.rb index ea2ddcde925..75889cd5bb6 100644 --- a/db/migrate/20200416005331_create_status_page_published_incidents.rb +++ b/db/migrate/20200416005331_create_status_page_published_incidents.rb @@ -15,8 +15,6 @@ class CreateStatusPagePublishedIncidents < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :status_page_published_incidents - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200417044453_create_alert_management_alerts.rb b/db/migrate/20200417044453_create_alert_management_alerts.rb index 3509f4946a7..6221eeeb24b 100644 --- a/db/migrate/20200417044453_create_alert_management_alerts.rb +++ b/db/migrate/20200417044453_create_alert_management_alerts.rb @@ -39,8 +39,6 @@ class CreateAlertManagementAlerts < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :alert_management_alerts - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200420104303_add_group_import_states_table.rb b/db/migrate/20200420104303_add_group_import_states_table.rb index 10b8cd4aa49..a44a2ea75f3 100644 --- a/db/migrate/20200420104303_add_group_import_states_table.rb +++ b/db/migrate/20200420104303_add_group_import_states_table.rb @@ -20,8 +20,6 @@ class AddGroupImportStatesTable < ActiveRecord::Migration[6.0] # rubocop:enable Migration/AddLimitToTextColumns def down - # rubocop:disable Migration/DropTable drop_table :group_import_states - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200420115948_create_metrics_users_starred_dashboard.rb b/db/migrate/20200420115948_create_metrics_users_starred_dashboard.rb index 8e9495f3a83..27130136e9d 100644 --- a/db/migrate/20200420115948_create_metrics_users_starred_dashboard.rb +++ b/db/migrate/20200420115948_create_metrics_users_starred_dashboard.rb @@ -20,8 +20,6 @@ class CreateMetricsUsersStarredDashboard < ActiveRecord::Migration[6.0] # rubocop: enable Migration/AddLimitToTextColumns def down - # rubocop:disable Migration/DropTable drop_table :metrics_users_starred_dashboards - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200422091541_create_ci_instance_variables.rb b/db/migrate/20200422091541_create_ci_instance_variables.rb index d1c954b4020..ab2a4722f89 100644 --- a/db/migrate/20200422091541_create_ci_instance_variables.rb +++ b/db/migrate/20200422091541_create_ci_instance_variables.rb @@ -26,8 +26,6 @@ class CreateCiInstanceVariables < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :ci_instance_variables - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb b/db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb new file mode 100644 index 00000000000..2555a50be44 --- /dev/null +++ b/db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddSharedRunnersEnabledAndOverrideToNamespaces < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :namespaces, :shared_runners_enabled, :boolean, default: true, null: false + add_column :namespaces, :allow_descendants_override_disabled_shared_runners, :boolean, default: false, null: false + end + end + + def down + with_lock_retries do + remove_column :namespaces, :shared_runners_enabled, :boolean + remove_column :namespaces, :allow_descendants_override_disabled_shared_runners, :boolean + end + end +end diff --git a/db/migrate/20200424135319_create_nuget_dependency_link_metadata.rb b/db/migrate/20200424135319_create_nuget_dependency_link_metadata.rb index 79adf41f973..1043616a1c7 100644 --- a/db/migrate/20200424135319_create_nuget_dependency_link_metadata.rb +++ b/db/migrate/20200424135319_create_nuget_dependency_link_metadata.rb @@ -21,8 +21,6 @@ class CreateNugetDependencyLinkMetadata < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :packages_nuget_dependency_link_metadata - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200430130048_create_packages_nuget_metadata.rb b/db/migrate/20200430130048_create_packages_nuget_metadata.rb index 3c89a143932..0f0d490c93d 100644 --- a/db/migrate/20200430130048_create_packages_nuget_metadata.rb +++ b/db/migrate/20200430130048_create_packages_nuget_metadata.rb @@ -29,8 +29,6 @@ class CreatePackagesNugetMetadata < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :packages_nuget_metadata - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200430174637_create_group_deploy_keys.rb b/db/migrate/20200430174637_create_group_deploy_keys.rb index 283c8769a80..9771ae013ea 100644 --- a/db/migrate/20200430174637_create_group_deploy_keys.rb +++ b/db/migrate/20200430174637_create_group_deploy_keys.rb @@ -31,8 +31,6 @@ class CreateGroupDeployKeys < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :group_deploy_keys - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200510181937_add_web_authn_xid_to_user_details.rb b/db/migrate/20200510181937_add_web_authn_xid_to_user_details.rb new file mode 100644 index 00000000000..d41e6611c45 --- /dev/null +++ b/db/migrate/20200510181937_add_web_authn_xid_to_user_details.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class AddWebAuthnXidToUserDetails < ActiveRecord::Migration[6.0] + DOWNTIME = false + + # rubocop:disable Migration/AddLimitToTextColumns + # limit is added in subsequent migration + def change + add_column :user_details, :webauthn_xid, :text + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20200510182218_add_text_limit_to_user_details_webauthn_xid.rb b/db/migrate/20200510182218_add_text_limit_to_user_details_webauthn_xid.rb new file mode 100644 index 00000000000..715cfd771f5 --- /dev/null +++ b/db/migrate/20200510182218_add_text_limit_to_user_details_webauthn_xid.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddTextLimitToUserDetailsWebauthnXid < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_text_limit :user_details, :webauthn_xid, 100 + end + + def down + remove_text_limit :user_details, :webauthn_xid + end +end diff --git a/db/migrate/20200510182556_add_text_limit_to_webauthn_registrations_name.rb b/db/migrate/20200510182556_add_text_limit_to_webauthn_registrations_name.rb new file mode 100644 index 00000000000..28805505ba6 --- /dev/null +++ b/db/migrate/20200510182556_add_text_limit_to_webauthn_registrations_name.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddTextLimitToWebauthnRegistrationsName < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_text_limit :webauthn_registrations, :name, 255 + end + + def down + remove_text_limit :webauthn_registrations, :name + end +end diff --git a/db/migrate/20200510182824_add_text_limit_to_webauthn_registrations_credential_xid.rb b/db/migrate/20200510182824_add_text_limit_to_webauthn_registrations_credential_xid.rb new file mode 100644 index 00000000000..51155f370ef --- /dev/null +++ b/db/migrate/20200510182824_add_text_limit_to_webauthn_registrations_credential_xid.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddTextLimitToWebauthnRegistrationsCredentialXid < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_text_limit :webauthn_registrations, :credential_xid, 255 + end + + def down + remove_text_limit :webauthn_registrations, :credential_xid + end +end diff --git a/db/migrate/20200510183128_add_foreign_key_from_webauthn_registrations_to_users.rb b/db/migrate/20200510183128_add_foreign_key_from_webauthn_registrations_to_users.rb new file mode 100644 index 00000000000..f71a5276dee --- /dev/null +++ b/db/migrate/20200510183128_add_foreign_key_from_webauthn_registrations_to_users.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddForeignKeyFromWebauthnRegistrationsToUsers < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + # disable_ddl_transaction! + + def up + with_lock_retries do + add_foreign_key :webauthn_registrations, :users, column: :user_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey + end + end + + def down + with_lock_retries do + remove_foreign_key :webauthn_registrations, column: :user_id + end + end +end diff --git a/db/migrate/20200521225327_create_alert_management_alert_assignees.rb b/db/migrate/20200521225327_create_alert_management_alert_assignees.rb index 095b2fdfeee..99de2646b3d 100644 --- a/db/migrate/20200521225327_create_alert_management_alert_assignees.rb +++ b/db/migrate/20200521225327_create_alert_management_alert_assignees.rb @@ -17,8 +17,6 @@ class CreateAlertManagementAlertAssignees < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :alert_management_alert_assignees - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200522205606_create_group_deploy_keys_group.rb b/db/migrate/20200522205606_create_group_deploy_keys_group.rb new file mode 100644 index 00000000000..85dbc14b0f5 --- /dev/null +++ b/db/migrate/20200522205606_create_group_deploy_keys_group.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +class CreateGroupDeployKeysGroup < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + def up + with_lock_retries do + create_table :group_deploy_keys_groups do |t| + t.timestamps_with_timezone + + t.references :group, index: false, null: false, foreign_key: { to_table: :namespaces, on_delete: :cascade } + t.references :group_deploy_key, null: false, foreign_key: { on_delete: :cascade } + + t.index [:group_id, :group_deploy_key_id], unique: true, name: 'index_group_deploy_keys_group_on_group_deploy_key_and_group_ids' + end + end + end + + def down + with_lock_retries do + drop_table :group_deploy_keys_groups + end + end +end diff --git a/db/migrate/20200524104346_add_source_to_resource_state_event.rb b/db/migrate/20200524104346_add_source_to_resource_state_event.rb new file mode 100644 index 00000000000..a1d1575bb02 --- /dev/null +++ b/db/migrate/20200524104346_add_source_to_resource_state_event.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddSourceToResourceStateEvent < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + unless column_exists?(:resource_state_events, :source_commit) + add_column :resource_state_events, :source_commit, :text + end + + add_text_limit :resource_state_events, :source_commit, 40 + end + + def down + remove_column :resource_state_events, :source_commit + end +end diff --git a/db/migrate/20200526193555_add_squash_option_to_project.rb b/db/migrate/20200526193555_add_squash_option_to_project.rb new file mode 100644 index 00000000000..6dd4e1c7c8e --- /dev/null +++ b/db/migrate/20200526193555_add_squash_option_to_project.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddSquashOptionToProject < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :project_settings, :squash_option, :integer, default: 3, limit: 2 + end +end diff --git a/db/migrate/20200526231421_update_index_approval_rule_name_for_code_owners_rule_type.rb b/db/migrate/20200526231421_update_index_approval_rule_name_for_code_owners_rule_type.rb new file mode 100644 index 00000000000..2483ff7f8fa --- /dev/null +++ b/db/migrate/20200526231421_update_index_approval_rule_name_for_code_owners_rule_type.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +class UpdateIndexApprovalRuleNameForCodeOwnersRuleType < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + LEGACY_INDEX_NAME_RULE_TYPE = "index_approval_rule_name_for_code_owners_rule_type" + LEGACY_INDEX_NAME_CODE_OWNERS = "approval_rule_name_index_for_code_owners" + + SECTIONAL_INDEX_NAME = "index_approval_rule_name_for_sectional_code_owners_rule_type" + + CODE_OWNER_RULE_TYPE = 2 + + def up + unless index_exists_by_name?(:approval_merge_request_rules, SECTIONAL_INDEX_NAME) + # Ensure only 1 code_owner rule with the same name and section per merge_request + # + add_concurrent_index( + :approval_merge_request_rules, + [:merge_request_id, :name, :section], + unique: true, + where: "rule_type = #{CODE_OWNER_RULE_TYPE}", + name: SECTIONAL_INDEX_NAME + ) + end + + remove_concurrent_index_by_name :approval_merge_request_rules, LEGACY_INDEX_NAME_RULE_TYPE + remove_concurrent_index_by_name :approval_merge_request_rules, LEGACY_INDEX_NAME_CODE_OWNERS + + add_concurrent_index( + :approval_merge_request_rules, + [:merge_request_id, :name], + unique: true, + where: "rule_type = #{CODE_OWNER_RULE_TYPE} AND section IS NULL", + name: LEGACY_INDEX_NAME_RULE_TYPE + ) + + add_concurrent_index( + :approval_merge_request_rules, + [:merge_request_id, :code_owner, :name], + unique: true, + where: "code_owner = true AND section IS NULL", + name: LEGACY_INDEX_NAME_CODE_OWNERS + ) + end + + def down + # In a rollback situation, we can't guarantee that there will not be + # records that were allowed under the more specific SECTIONAL_INDEX_NAME + # index but would cause uniqueness violations under both the + # LEGACY_INDEX_NAME_RULE_TYPE and LEGACY_INDEX_NAME_CODE_OWNERS indices. + # Therefore, we need to first find all the MergeRequests with + # ApprovalMergeRequestRules that would violate these "new" indices and + # delete those approval rules, then create the new index, then finally + # recreate the approval rules for those merge requests. + # + + # First, find all MergeRequests with ApprovalMergeRequestRules that will + # violate the new index. + # + if Gitlab.ee? + merge_request_ids = ApprovalMergeRequestRule + .select(:merge_request_id) + .where(rule_type: CODE_OWNER_RULE_TYPE) + .group(:merge_request_id, :rule_type, :name) + .includes(:merge_request) + .having("count(*) > 1") + .collect(&:merge_request_id) + + # Delete ALL their code_owner approval rules + # + merge_request_ids.each_slice(10) do |ids| + ApprovalMergeRequestRule.where(merge_request_id: ids).code_owner.delete_all + end + end + + # Remove legacy partial indices that only apply to `section IS NULL` records + # + remove_concurrent_index_by_name :approval_merge_request_rules, LEGACY_INDEX_NAME_RULE_TYPE + remove_concurrent_index_by_name :approval_merge_request_rules, LEGACY_INDEX_NAME_CODE_OWNERS + + # Reconstruct original "legacy" indices + # + add_concurrent_index( + :approval_merge_request_rules, + [:merge_request_id, :name], + unique: true, + where: "rule_type = #{CODE_OWNER_RULE_TYPE}", + name: LEGACY_INDEX_NAME_RULE_TYPE + ) + + add_concurrent_index( + :approval_merge_request_rules, + [:merge_request_id, :code_owner, :name], + unique: true, + where: "code_owner = true", + name: LEGACY_INDEX_NAME_CODE_OWNERS + ) + + # MergeRequest::SyncCodeOwnerApprovalRules recreates the code_owner rules + # from scratch, adding them to the index. Duplicates will be rejected. + # + if Gitlab.ee? + merge_request_ids.each_slice(10) do |ids| + MergeRequest.where(id: ids).each do |merge_request| + MergeRequests::SyncCodeOwnerApprovalRules.new(merge_request).execute + end + end + end + + remove_concurrent_index_by_name :approval_merge_request_rules, SECTIONAL_INDEX_NAME + end +end diff --git a/db/migrate/20200527211605_add_locked_to_ci_pipelines.rb b/db/migrate/20200527211605_add_locked_to_ci_pipelines.rb new file mode 100644 index 00000000000..3587e6c4a08 --- /dev/null +++ b/db/migrate/20200527211605_add_locked_to_ci_pipelines.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddLockedToCiPipelines < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :ci_pipelines, :locked, :integer, limit: 2, null: false, default: 0 + end + end + + def down + with_lock_retries do + remove_column :ci_pipelines, :locked + end + end +end diff --git a/db/migrate/20200604001128_add_secrets_to_ci_builds_metadata.rb b/db/migrate/20200604001128_add_secrets_to_ci_builds_metadata.rb new file mode 100644 index 00000000000..9a67993cf5c --- /dev/null +++ b/db/migrate/20200604001128_add_secrets_to_ci_builds_metadata.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddSecretsToCiBuildsMetadata < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :ci_builds_metadata, :secrets, :jsonb, default: {}, null: false + end + end + + def down + with_lock_retries do + remove_column :ci_builds_metadata, :secrets + end + end +end diff --git a/db/migrate/20200604143628_create_project_security_settings.rb b/db/migrate/20200604143628_create_project_security_settings.rb index b1a08cf8781..f972cb509a7 100644 --- a/db/migrate/20200604143628_create_project_security_settings.rb +++ b/db/migrate/20200604143628_create_project_security_settings.rb @@ -21,9 +21,7 @@ class CreateProjectSecuritySettings < ActiveRecord::Migration[6.0] def down with_lock_retries do - # rubocop:disable Migration/DropTable drop_table :project_security_settings - # rubocop:enable Migration/DropTable end end end diff --git a/db/migrate/20200604145731_create_board_user_preferences.rb b/db/migrate/20200604145731_create_board_user_preferences.rb index 36e5014fdbe..e83f467d690 100644 --- a/db/migrate/20200604145731_create_board_user_preferences.rb +++ b/db/migrate/20200604145731_create_board_user_preferences.rb @@ -15,8 +15,6 @@ class CreateBoardUserPreferences < ActiveRecord::Migration[6.0] end def down - # rubocop:disable Migration/DropTable drop_table :board_user_preferences - # rubocop:enable Migration/DropTable end end diff --git a/db/migrate/20200605160806_add_index_on_repository_size_and_project_id_to_project_statistics.rb b/db/migrate/20200605160806_add_index_on_repository_size_and_project_id_to_project_statistics.rb new file mode 100644 index 00000000000..2e7b75bcd17 --- /dev/null +++ b/db/migrate/20200605160806_add_index_on_repository_size_and_project_id_to_project_statistics.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexOnRepositorySizeAndProjectIdToProjectStatistics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :project_statistics, [:repository_size, :project_id] + end + + def down + remove_concurrent_index :project_statistics, [:repository_size, :project_id] + end +end diff --git a/db/migrate/20200605160836_add_index_on_storage_size_and_project_id_to_project_statistics.rb b/db/migrate/20200605160836_add_index_on_storage_size_and_project_id_to_project_statistics.rb new file mode 100644 index 00000000000..22f9dab634b --- /dev/null +++ b/db/migrate/20200605160836_add_index_on_storage_size_and_project_id_to_project_statistics.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexOnStorageSizeAndProjectIdToProjectStatistics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :project_statistics, [:storage_size, :project_id] + end + + def down + remove_concurrent_index :project_statistics, [:storage_size, :project_id] + end +end diff --git a/db/migrate/20200605160851_add_index_on_wiki_size_and_project_id_to_project_statistics.rb b/db/migrate/20200605160851_add_index_on_wiki_size_and_project_id_to_project_statistics.rb new file mode 100644 index 00000000000..d32994afbfc --- /dev/null +++ b/db/migrate/20200605160851_add_index_on_wiki_size_and_project_id_to_project_statistics.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexOnWikiSizeAndProjectIdToProjectStatistics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :project_statistics, [:wiki_size, :project_id] + end + + def down + remove_concurrent_index :project_statistics, [:wiki_size, :project_id] + end +end diff --git a/db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb b/db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb new file mode 100644 index 00000000000..d7f282b69f8 --- /dev/null +++ b/db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddTraversalIdsToNamespaces < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :namespaces, :traversal_ids, :integer, array: true, default: [], null: false + end + end + + def down + with_lock_retries do + remove_column :namespaces, :traversal_ids + end + end +end diff --git a/db/migrate/20200610130002_create_vulnerability_statistics.rb b/db/migrate/20200610130002_create_vulnerability_statistics.rb new file mode 100644 index 00000000000..77fd116230e --- /dev/null +++ b/db/migrate/20200610130002_create_vulnerability_statistics.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +class CreateVulnerabilityStatistics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + create_table :vulnerability_statistics do |t| + t.timestamps_with_timezone null: false + t.references :project, null: false, foreign_key: { on_delete: :cascade } + t.integer :total, default: 0, null: false + t.integer :critical, default: 0, null: false + t.integer :high, default: 0, null: false + t.integer :medium, default: 0, null: false + t.integer :low, default: 0, null: false + t.integer :unknown, default: 0, null: false + t.integer :info, default: 0, null: false + t.integer :letter_grade, limit: 1, index: true, null: false + end + end + end + + def down + with_lock_retries do + drop_table :vulnerability_statistics + end + end +end diff --git a/db/migrate/20200613104045_add_compliance_frameworks_to_application_settings.rb b/db/migrate/20200613104045_add_compliance_frameworks_to_application_settings.rb new file mode 100644 index 00000000000..be6f14692e7 --- /dev/null +++ b/db/migrate/20200613104045_add_compliance_frameworks_to_application_settings.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddComplianceFrameworksToApplicationSettings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :application_settings, :compliance_frameworks, :integer, limit: 2, array: true, default: [], null: false + end + end + + def down + with_lock_retries do + remove_column :application_settings, :compliance_frameworks + end + end +end diff --git a/db/migrate/20200615141554_add_closed_by_fields_to_resource_state_events.rb b/db/migrate/20200615141554_add_closed_by_fields_to_resource_state_events.rb new file mode 100644 index 00000000000..ba11e64e667 --- /dev/null +++ b/db/migrate/20200615141554_add_closed_by_fields_to_resource_state_events.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddClosedByFieldsToResourceStateEvents < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + add_column :resource_state_events, :close_after_error_tracking_resolve, :boolean, default: false, null: false + add_column :resource_state_events, :close_auto_resolve_prometheus_alert, :boolean, default: false, null: false + end + + def down + remove_column :resource_state_events, :close_auto_resolve_prometheus_alert, :boolean + remove_column :resource_state_events, :close_after_error_tracking_resolve, :boolean + end +end diff --git a/db/migrate/20200615193524_add_verify_known_sign_in_to_application_settings.rb b/db/migrate/20200615193524_add_verify_known_sign_in_to_application_settings.rb new file mode 100644 index 00000000000..c50a17968a9 --- /dev/null +++ b/db/migrate/20200615193524_add_verify_known_sign_in_to_application_settings.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddVerifyKnownSignInToApplicationSettings < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :application_settings, :notify_on_unknown_sign_in, :boolean, default: true, null: false + end +end diff --git a/db/migrate/20200615234047_create_clusters_applications_cilium.rb b/db/migrate/20200615234047_create_clusters_applications_cilium.rb new file mode 100644 index 00000000000..9f77ee71164 --- /dev/null +++ b/db/migrate/20200615234047_create_clusters_applications_cilium.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class CreateClustersApplicationsCilium < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + create_table :clusters_applications_cilium do |t| + t.references :cluster, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } + t.timestamps_with_timezone null: false + t.integer :status, null: false + t.text :status_reason # rubocop:disable Migration/AddLimitToTextColumns + end + end +end diff --git a/db/migrate/20200616124338_add_plan_limits_for_max_size_per_artifact_type.rb b/db/migrate/20200616124338_add_plan_limits_for_max_size_per_artifact_type.rb new file mode 100644 index 00000000000..28fadb495dd --- /dev/null +++ b/db/migrate/20200616124338_add_plan_limits_for_max_size_per_artifact_type.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +class AddPlanLimitsForMaxSizePerArtifactType < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + # We need to set the 20mb default for lsif for backward compatibility + # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34767#note_371619075 + add_column :plan_limits, "ci_max_artifact_size_lsif", :integer, default: 20, null: false + + artifact_types.each do |type| + add_column :plan_limits, "ci_max_artifact_size_#{type}", :integer, default: 0, null: false + end + end + + private + + def artifact_types + # The list of artifact types (except lsif) from Ci::JobArtifact file_type enum as of this writing. + # Intentionally duplicated so that the migration won't change behavior + # if ever we remove or add more to the list later on. + %w[ + archive + metadata + trace + junit + sast + dependency_scanning + container_scanning + dast + codequality + license_management + license_scanning + performance + metrics + metrics_referee + network_referee + dotenv + cobertura + terraform + accessibility + cluster_applications + secret_detection + requirements + coverage_fuzzing + ] + end +end diff --git a/db/migrate/20200616145031_add_author_id_index_to_audit_events.rb b/db/migrate/20200616145031_add_author_id_index_to_audit_events.rb new file mode 100644 index 00000000000..cb06fbe2b11 --- /dev/null +++ b/db/migrate/20200616145031_add_author_id_index_to_audit_events.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class AddAuthorIdIndexToAuditEvents < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + INDEX_NAME = 'index_audit_events_on_entity_id_entity_type_id_desc_author_id' + OLD_INDEX_NAME = 'index_audit_events_on_entity_id_and_entity_type_and_id_desc' + + def up + add_concurrent_index(:audit_events, [:entity_id, :entity_type, :id, :author_id], order: { id: :desc }, name: INDEX_NAME) + remove_concurrent_index_by_name(:audit_events, OLD_INDEX_NAME) + end + + def down + add_concurrent_index(:audit_events, [:entity_id, :entity_type, :id], order: { id: :desc }, name: OLD_INDEX_NAME) + remove_concurrent_index_by_name(:audit_events, INDEX_NAME) + end +end diff --git a/db/migrate/20200617000757_clean_up_file_store_lfs_objects.rb b/db/migrate/20200617000757_clean_up_file_store_lfs_objects.rb new file mode 100644 index 00000000000..a1a86355d02 --- /dev/null +++ b/db/migrate/20200617000757_clean_up_file_store_lfs_objects.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class CleanUpFileStoreLfsObjects < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + # rubocop:disable Migration/UpdateColumnInBatches + update_column_in_batches(:lfs_objects, :file_store, 1) do |table, query| + query.where(table[:file_store].eq(nil)) + end + # rubocop:enable Migration/UpdateColumnInBatches + end + + def down + # no-op + end +end diff --git a/db/migrate/20200617001001_clean_up_store_uploads.rb b/db/migrate/20200617001001_clean_up_store_uploads.rb new file mode 100644 index 00000000000..970d0485b0d --- /dev/null +++ b/db/migrate/20200617001001_clean_up_store_uploads.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class CleanUpStoreUploads < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + # rubocop:disable Migration/UpdateColumnInBatches + update_column_in_batches(:uploads, :store, 1) do |table, query| + query.where(table[:store].eq(nil)) + end + # rubocop:enable Migration/UpdateColumnInBatches + end + + def down + # no-op + end +end diff --git a/db/migrate/20200617001118_clean_up_file_store_ci_job_artifacts.rb b/db/migrate/20200617001118_clean_up_file_store_ci_job_artifacts.rb new file mode 100644 index 00000000000..e30f7e342e5 --- /dev/null +++ b/db/migrate/20200617001118_clean_up_file_store_ci_job_artifacts.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class CleanUpFileStoreCiJobArtifacts < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + # rubocop:disable Migration/UpdateColumnInBatches + # rubocop:disable Migration/UpdateLargeTable + update_column_in_batches(:ci_job_artifacts, :file_store, 1) do |table, query| + query.where(table[:file_store].eq(nil)) + end + # rubocop:enable Migration/UpdateColumnInBatches + # rubocop:enable Migration/UpdateLargeTable + end + + def down + # no-op + end +end diff --git a/db/migrate/20200617150041_create_namespace_limits.rb b/db/migrate/20200617150041_create_namespace_limits.rb new file mode 100644 index 00000000000..59a014ff7ca --- /dev/null +++ b/db/migrate/20200617150041_create_namespace_limits.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class CreateNamespaceLimits < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + create_table :namespace_limits, id: false do |t| + t.bigint :additional_purchased_storage_size, default: 0, null: false + t.date :additional_purchased_storage_ends_on, null: true + + t.references :namespace, primary_key: true, default: nil, type: :integer, index: false, foreign_key: { on_delete: :cascade } + end + end + end + + def down + drop_table :namespace_limits + end +end diff --git a/db/migrate/20200617205000_add_deploy_key_id_to_push_access_levels.rb b/db/migrate/20200617205000_add_deploy_key_id_to_push_access_levels.rb new file mode 100644 index 00000000000..11b92c2a321 --- /dev/null +++ b/db/migrate/20200617205000_add_deploy_key_id_to_push_access_levels.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class AddDeployKeyIdToPushAccessLevels < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + unless column_exists?(:protected_branch_push_access_levels, :deploy_key_id) + add_column :protected_branch_push_access_levels, :deploy_key_id, :integer + end + + add_concurrent_foreign_key :protected_branch_push_access_levels, :keys, column: :deploy_key_id, on_delete: :cascade + add_concurrent_index :protected_branch_push_access_levels, :deploy_key_id, name: 'index_deploy_key_id_on_protected_branch_push_access_levels' + end + + def down + remove_column :protected_branch_push_access_levels, :deploy_key_id + end +end diff --git a/db/migrate/20200618105638_add_index_on_id_and_created_at_to_snippets.rb b/db/migrate/20200618105638_add_index_on_id_and_created_at_to_snippets.rb new file mode 100644 index 00000000000..d9ef3b18e9b --- /dev/null +++ b/db/migrate/20200618105638_add_index_on_id_and_created_at_to_snippets.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexOnIdAndCreatedAtToSnippets < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :snippets, [:id, :created_at] + end + + def down + remove_concurrent_index :snippets, [:id, :created_at] + end +end diff --git a/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb b/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb new file mode 100644 index 00000000000..85e98d05d02 --- /dev/null +++ b/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class RestorePreviousSchemaWithoutLockVersionNullConstraint < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + TABLES = %i(epics merge_requests issues ci_stages ci_builds ci_pipelines).freeze + + disable_ddl_transaction! + + def up + TABLES.each do |table| + remove_not_null_constraint table, :lock_version + end + end + + def down + # no-op + end +end diff --git a/db/migrate/20200618134723_restore_previous_schema_with_lock_version_indices.rb b/db/migrate/20200618134723_restore_previous_schema_with_lock_version_indices.rb new file mode 100644 index 00000000000..64fdb373387 --- /dev/null +++ b/db/migrate/20200618134723_restore_previous_schema_with_lock_version_indices.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class RestorePreviousSchemaWithLockVersionIndices < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :issues, :lock_version, where: "lock_version IS NULL" + add_concurrent_index :merge_requests, :lock_version, where: "lock_version IS NULL" + add_concurrent_index :epics, :lock_version, where: "lock_version IS NULL" + add_concurrent_index :ci_stages, :id, where: "lock_version IS NULL", name: "tmp_index_ci_stages_lock_version" + add_concurrent_index :ci_builds, :id, where: "lock_version IS NULL", name: "tmp_index_ci_builds_lock_version" + add_concurrent_index :ci_pipelines, :id, where: "lock_version IS NULL", name: "tmp_index_ci_pipelines_lock_version" + end + + def down + # no-op + end +end diff --git a/db/migrate/20200619000316_add_has_confluence_to_project_settings.rb b/db/migrate/20200619000316_add_has_confluence_to_project_settings.rb new file mode 100644 index 00000000000..0f33e0bc47a --- /dev/null +++ b/db/migrate/20200619000316_add_has_confluence_to_project_settings.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddHasConfluenceToProjectSettings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :project_settings, :has_confluence, :boolean, default: false, null: false + end + end + + def down + with_lock_retries do + remove_column :project_settings, :has_confluence + end + end +end diff --git a/db/migrate/20200619154527_add_project_key_to_jira_tracker_data.rb b/db/migrate/20200619154527_add_project_key_to_jira_tracker_data.rb new file mode 100644 index 00000000000..574eb99a6cc --- /dev/null +++ b/db/migrate/20200619154527_add_project_key_to_jira_tracker_data.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class AddProjectKeyToJiraTrackerData < ActiveRecord::Migration[6.0] + DOWNTIME = false + + # rubocop:disable Migration/AddLimitToTextColumns + # limit is added in 20200619154528_add_text_limit_to_jira_tracker_data_project_key + def change + add_column :jira_tracker_data, :project_key, :text + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20200619154528_add_text_limit_to_jira_tracker_data_project_key.rb b/db/migrate/20200619154528_add_text_limit_to_jira_tracker_data_project_key.rb new file mode 100644 index 00000000000..6cf8a787381 --- /dev/null +++ b/db/migrate/20200619154528_add_text_limit_to_jira_tracker_data_project_key.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddTextLimitToJiraTrackerDataProjectKey < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_text_limit :jira_tracker_data, :project_key, 255 + end + + def down + remove_text_limit :jira_tracker_data, :project_key + end +end diff --git a/db/migrate/20200622040750_add_prometheus_alert_id_to_alert_management_alerts.rb b/db/migrate/20200622040750_add_prometheus_alert_id_to_alert_management_alerts.rb new file mode 100644 index 00000000000..e7669db0a28 --- /dev/null +++ b/db/migrate/20200622040750_add_prometheus_alert_id_to_alert_management_alerts.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddPrometheusAlertIdToAlertManagementAlerts < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + add_column :alert_management_alerts, :prometheus_alert_id, :integer + + add_column :alert_management_alerts, :environment_id, :integer + end + + def down + remove_column :alert_management_alerts, :prometheus_alert_id + remove_column :alert_management_alerts, :environment_id + end +end diff --git a/db/migrate/20200622070606_add_vendor_to_vulnerability_scanners.rb b/db/migrate/20200622070606_add_vendor_to_vulnerability_scanners.rb new file mode 100644 index 00000000000..2c9c0a9110d --- /dev/null +++ b/db/migrate/20200622070606_add_vendor_to_vulnerability_scanners.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class AddVendorToVulnerabilityScanners < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + DEFAULT_SCANNER_VENDOR = 'GitLab' + + # rubocop:disable Migration/AddLimitToTextColumns + # limit is added in 20200622070620_add_limit_to_vulnerability_scanners_vendor + def up + with_lock_retries do + add_column :vulnerability_scanners, :vendor, :text, default: DEFAULT_SCANNER_VENDOR, null: false + end + end + + def down + with_lock_retries do + remove_column :vulnerability_scanners, :vendor + end + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20200622070620_add_limit_to_vulnerability_scanners_vendor.rb b/db/migrate/20200622070620_add_limit_to_vulnerability_scanners_vendor.rb new file mode 100644 index 00000000000..efcbbde3e29 --- /dev/null +++ b/db/migrate/20200622070620_add_limit_to_vulnerability_scanners_vendor.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddLimitToVulnerabilityScannersVendor < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_text_limit :vulnerability_scanners, :vendor, 255, validate: false + end + + def down + remove_text_limit :vulnerability_scanners, :vendor + end +end diff --git a/db/migrate/20200622095419_add_snippets_size_to_project_statistics.rb b/db/migrate/20200622095419_add_snippets_size_to_project_statistics.rb new file mode 100644 index 00000000000..9fe470478b8 --- /dev/null +++ b/db/migrate/20200622095419_add_snippets_size_to_project_statistics.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddSnippetsSizeToProjectStatistics < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :project_statistics, :snippets_size, :bigint + end +end diff --git a/db/migrate/20200622103836_create_snippet_statistics.rb b/db/migrate/20200622103836_create_snippet_statistics.rb new file mode 100644 index 00000000000..691a9acdc04 --- /dev/null +++ b/db/migrate/20200622103836_create_snippet_statistics.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +class CreateSnippetStatistics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + create_table :snippet_statistics, id: false do |t| + t.references :snippet, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade } + t.bigint :repository_size, default: 0, null: false + t.bigint :file_count, default: 0, null: false + t.bigint :commit_count, default: 0, null: false + end + end + end + + def down + with_lock_retries do + drop_table :snippet_statistics + end + end +end diff --git a/db/migrate/20200622104923_create_ci_pipeline_messages_table.rb b/db/migrate/20200622104923_create_ci_pipeline_messages_table.rb new file mode 100644 index 00000000000..40d63b1189e --- /dev/null +++ b/db/migrate/20200622104923_create_ci_pipeline_messages_table.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class CreateCiPipelineMessagesTable < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + ERROR_SEVERITY = 0 + MAX_CONTENT_LENGTH = 10_000 + + disable_ddl_transaction! + + def up + with_lock_retries do + create_table :ci_pipeline_messages do |t| + t.integer :severity, null: false, default: ERROR_SEVERITY, limit: 2 + t.references :pipeline, index: true, null: false, foreign_key: { to_table: :ci_pipelines, on_delete: :cascade }, type: :integer + t.text :content, null: false + end + end + + add_text_limit :ci_pipeline_messages, :content, MAX_CONTENT_LENGTH + end + + def down + drop_table :ci_pipeline_messages + end +end diff --git a/db/migrate/20200622235737_remove_index_ci_job_artifacts_file_store_is_null.rb b/db/migrate/20200622235737_remove_index_ci_job_artifacts_file_store_is_null.rb new file mode 100644 index 00000000000..e293bcfa1ce --- /dev/null +++ b/db/migrate/20200622235737_remove_index_ci_job_artifacts_file_store_is_null.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class RemoveIndexCiJobArtifactsFileStoreIsNull < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_ci_job_artifacts_file_store_is_null' + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name(:ci_job_artifacts, INDEX_NAME) + end + + def down + add_concurrent_index(:ci_job_artifacts, :id, where: "file_store IS NULL", name: INDEX_NAME) + end +end diff --git a/db/migrate/20200623000148_remove_index_lfs_objects_file_store_is_null.rb b/db/migrate/20200623000148_remove_index_lfs_objects_file_store_is_null.rb new file mode 100644 index 00000000000..76faa5c4cd2 --- /dev/null +++ b/db/migrate/20200623000148_remove_index_lfs_objects_file_store_is_null.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class RemoveIndexLfsObjectsFileStoreIsNull < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_lfs_objects_file_store_is_null' + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name(:lfs_objects, INDEX_NAME) + end + + def down + add_concurrent_index(:lfs_objects, :id, where: "file_store IS NULL", name: INDEX_NAME) + end +end diff --git a/db/migrate/20200623000320_remove_index_uploads_store_is_null.rb b/db/migrate/20200623000320_remove_index_uploads_store_is_null.rb new file mode 100644 index 00000000000..ad84cd5a649 --- /dev/null +++ b/db/migrate/20200623000320_remove_index_uploads_store_is_null.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class RemoveIndexUploadsStoreIsNull < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_uploads_store_is_null' + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name(:uploads, INDEX_NAME) + end + + def down + add_concurrent_index(:uploads, :id, where: "store IS NULL", name: INDEX_NAME) + end +end diff --git a/db/migrate/20200623073431_add_source_merge_request_id_to_resource_state_events.rb b/db/migrate/20200623073431_add_source_merge_request_id_to_resource_state_events.rb new file mode 100644 index 00000000000..8970797d3c0 --- /dev/null +++ b/db/migrate/20200623073431_add_source_merge_request_id_to_resource_state_events.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +class AddSourceMergeRequestIdToResourceStateEvents < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + INDEX_NAME = 'index_resource_state_events_on_source_merge_request_id' + + DOWNTIME = false + + disable_ddl_transaction! + + def up + unless column_exists?(:resource_state_events, :source_merge_request_id) + add_column :resource_state_events, :source_merge_request_id, :bigint + end + + unless index_exists?(:resource_state_events, :source_merge_request_id, name: INDEX_NAME) + add_index :resource_state_events, :source_merge_request_id, name: INDEX_NAME # rubocop: disable Migration/AddIndex + end + + unless foreign_key_exists?(:resource_state_events, :merge_requests, column: :source_merge_request_id) + with_lock_retries do + add_foreign_key :resource_state_events, :merge_requests, column: :source_merge_request_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey + end + end + end + + def down + with_lock_retries do + remove_column :resource_state_events, :source_merge_request_id + end + end +end diff --git a/db/migrate/20200623090030_add_author_name_to_audit_event.rb b/db/migrate/20200623090030_add_author_name_to_audit_event.rb new file mode 100644 index 00000000000..8b45503189a --- /dev/null +++ b/db/migrate/20200623090030_add_author_name_to_audit_event.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class AddAuthorNameToAuditEvent < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + disable_ddl_transaction! + + def up + unless column_exists?(:audit_events, :author_name) + with_lock_retries do + add_column :audit_events, :author_name, :text + end + end + + add_text_limit :audit_events, :author_name, 255 + end + + def down + remove_column :audit_events, :author_name + end +end diff --git a/db/migrate/20200623121135_create_dynamic_partitions_schema.rb b/db/migrate/20200623121135_create_dynamic_partitions_schema.rb new file mode 100644 index 00000000000..931a55ebcf4 --- /dev/null +++ b/db/migrate/20200623121135_create_dynamic_partitions_schema.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class CreateDynamicPartitionsSchema < ActiveRecord::Migration[6.0] + include Gitlab::Database::SchemaHelpers + + DOWNTIME = false + + def up + execute 'CREATE SCHEMA gitlab_partitions_dynamic' + + create_comment(:schema, :gitlab_partitions_dynamic, <<~EOS.strip) + Schema to hold partitions managed dynamically from the application, e.g. for time space partitioning. + EOS + end + + def down + execute 'DROP SCHEMA gitlab_partitions_dynamic' + end +end diff --git a/db/migrate/20200623141217_add_view_diffs_file_by_file_to_user_preferences.rb b/db/migrate/20200623141217_add_view_diffs_file_by_file_to_user_preferences.rb new file mode 100644 index 00000000000..9ea38bd4ab4 --- /dev/null +++ b/db/migrate/20200623141217_add_view_diffs_file_by_file_to_user_preferences.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddViewDiffsFileByFileToUserPreferences < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + with_lock_retries do + add_column :user_preferences, :view_diffs_file_by_file, :boolean, default: false, null: false + end + end + + def down + with_lock_retries do + remove_column :user_preferences, :view_diffs_file_by_file, :boolean + end + end +end diff --git a/db/migrate/20200623141544_create_elastic_reindexing_task.rb b/db/migrate/20200623141544_create_elastic_reindexing_task.rb new file mode 100644 index 00000000000..7089df4f1ea --- /dev/null +++ b/db/migrate/20200623141544_create_elastic_reindexing_task.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +class CreateElasticReindexingTask < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + create_table :elastic_reindexing_tasks do |t| + t.timestamps_with_timezone null: false + t.integer :documents_count + t.integer :state, null: false, default: 0, limit: 2, index: true + t.boolean :in_progress, null: false, default: true + t.text :index_name_from + t.text :index_name_to + t.text :elastic_task + t.text :error_message + end + + add_text_limit :elastic_reindexing_tasks, :index_name_from, 255 + add_text_limit :elastic_reindexing_tasks, :index_name_to, 255 + add_text_limit :elastic_reindexing_tasks, :elastic_task, 255 + add_text_limit :elastic_reindexing_tasks, :error_message, 255 + + add_index :elastic_reindexing_tasks, :in_progress, unique: true, where: 'in_progress' + end + + def down + drop_table :elastic_reindexing_tasks + end +end diff --git a/db/migrate/20200623170000_create_static_partitions_schema.rb b/db/migrate/20200623170000_create_static_partitions_schema.rb new file mode 100644 index 00000000000..d8878d2fe33 --- /dev/null +++ b/db/migrate/20200623170000_create_static_partitions_schema.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class CreateStaticPartitionsSchema < ActiveRecord::Migration[6.0] + include Gitlab::Database::SchemaHelpers + + DOWNTIME = false + + def up + execute 'CREATE SCHEMA gitlab_partitions_static' + + create_comment(:schema, :gitlab_partitions_static, <<~EOS.strip) + Schema to hold static partitions, e.g. for hash partitioning + EOS + end + + def down + execute 'DROP SCHEMA gitlab_partitions_static' + end +end diff --git a/db/migrate/20200623185440_add_product_analytics_table.rb b/db/migrate/20200623185440_add_product_analytics_table.rb new file mode 100644 index 00000000000..0a0d438bfb9 --- /dev/null +++ b/db/migrate/20200623185440_add_product_analytics_table.rb @@ -0,0 +1,202 @@ +# frozen_string_literal: true + +class AddProductAnalyticsTable < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # Table is based on https://github.com/snowplow/snowplow/blob/master/4-storage/postgres-storage/sql/atomic-def.sql 6e07b1c, with the following differences: + # * app_id varchar -> project_id integer (+ FK) + # * Add `id bigserial` + # * Hash partitioning based on `project_id` + # * Timestamp columns: Change type to timestamp with time zone + # + # This table is part of the "product analytics experiment" and as such marked "experimental". The goal here is to + # explore the product analytics as a MVP feature more. We are explicitly not spending time on relational modeling + # here. + # + # We expect significant changes to the database part of this once the feature has been validated. + # Therefore, we expect to drop the table when feature validation is complete. All data will be lost. + def up + with_lock_retries do + execute <<~SQL + CREATE TABLE "product_analytics_events_experimental" ( + id bigserial NOT NULL, + -- App + "project_id" integer NOT NULL REFERENCES projects(id) ON DELETE CASCADE, + "platform" varchar(255), + -- Date/time + "etl_tstamp" timestamp with time zone, + "collector_tstamp" timestamp with time zone NOT NULL, + "dvce_created_tstamp" timestamp with time zone, + -- Date/time + "event" varchar(128), + "event_id" char(36) NOT NULL, + "txn_id" integer, + -- Versioning + "name_tracker" varchar(128), + "v_tracker" varchar(100), + "v_collector" varchar(100) NOT NULL, + "v_etl" varchar(100) NOT NULL, + -- User and visit + "user_id" varchar(255), + "user_ipaddress" varchar(45), + "user_fingerprint" varchar(50), + "domain_userid" varchar(36), + "domain_sessionidx" smallint, + "network_userid" varchar(38), + -- Location + "geo_country" char(2), + "geo_region" char(3), + "geo_city" varchar(75), + "geo_zipcode" varchar(15), + "geo_latitude" double precision, + "geo_longitude" double precision, + "geo_region_name" varchar(100), + -- IP lookups + "ip_isp" varchar(100), + "ip_organization" varchar(100), + "ip_domain" varchar(100), + "ip_netspeed" varchar(100), + -- Page + "page_url" text, + "page_title" varchar(2000), + "page_referrer" text, + -- Page URL components + "page_urlscheme" varchar(16), + "page_urlhost" varchar(255), + "page_urlport" integer, + "page_urlpath" varchar(3000), + "page_urlquery" varchar(6000), + "page_urlfragment" varchar(3000), + -- Referrer URL components + "refr_urlscheme" varchar(16), + "refr_urlhost" varchar(255), + "refr_urlport" integer, + "refr_urlpath" varchar(6000), + "refr_urlquery" varchar(6000), + "refr_urlfragment" varchar(3000), + -- Referrer details + "refr_medium" varchar(25), + "refr_source" varchar(50), + "refr_term" varchar(255), + -- Marketing + "mkt_medium" varchar(255), + "mkt_source" varchar(255), + "mkt_term" varchar(255), + "mkt_content" varchar(500), + "mkt_campaign" varchar(255), + -- Custom structured event + "se_category" varchar(1000), + "se_action" varchar(1000), + "se_label" varchar(1000), + "se_property" varchar(1000), + "se_value" double precision, + -- Ecommerce + "tr_orderid" varchar(255), + "tr_affiliation" varchar(255), + "tr_total" decimal(18,2), + "tr_tax" decimal(18,2), + "tr_shipping" decimal(18,2), + "tr_city" varchar(255), + "tr_state" varchar(255), + "tr_country" varchar(255), + "ti_orderid" varchar(255), + "ti_sku" varchar(255), + "ti_name" varchar(255), + "ti_category" varchar(255), + "ti_price" decimal(18,2), + "ti_quantity" integer, + -- Page ping + "pp_xoffset_min" integer, + "pp_xoffset_max" integer, + "pp_yoffset_min" integer, + "pp_yoffset_max" integer, + -- User Agent + "useragent" varchar(1000), + -- Browser + "br_name" varchar(50), + "br_family" varchar(50), + "br_version" varchar(50), + "br_type" varchar(50), + "br_renderengine" varchar(50), + "br_lang" varchar(255), + "br_features_pdf" boolean, + "br_features_flash" boolean, + "br_features_java" boolean, + "br_features_director" boolean, + "br_features_quicktime" boolean, + "br_features_realplayer" boolean, + "br_features_windowsmedia" boolean, + "br_features_gears" boolean, + "br_features_silverlight" boolean, + "br_cookies" boolean, + "br_colordepth" varchar(12), + "br_viewwidth" integer, + "br_viewheight" integer, + -- Operating System + "os_name" varchar(50), + "os_family" varchar(50), + "os_manufacturer" varchar(50), + "os_timezone" varchar(50), + -- Device/Hardware + "dvce_type" varchar(50), + "dvce_ismobile" boolean, + "dvce_screenwidth" integer, + "dvce_screenheight" integer, + -- Document + "doc_charset" varchar(128), + "doc_width" integer, + "doc_height" integer, + -- Currency + "tr_currency" char(3), + "tr_total_base" decimal(18, 2), + "tr_tax_base" decimal(18, 2), + "tr_shipping_base" decimal(18, 2), + "ti_currency" char(3), + "ti_price_base" decimal(18, 2), + "base_currency" char(3), + -- Geolocation + "geo_timezone" varchar(64), + -- Click ID + "mkt_clickid" varchar(128), + "mkt_network" varchar(64), + -- ETL tags + "etl_tags" varchar(500), + -- Time event was sent + "dvce_sent_tstamp" timestamp with time zone, + -- Referer + "refr_domain_userid" varchar(36), + "refr_dvce_tstamp" timestamp with time zone, + -- Session ID + "domain_sessionid" char(36), + -- Derived timestamp + "derived_tstamp" timestamp with time zone, + -- Event schema + "event_vendor" varchar(1000), + "event_name" varchar(1000), + "event_format" varchar(128), + "event_version" varchar(128), + -- Event fingerprint + "event_fingerprint" varchar(128), + -- True timestamp + "true_tstamp" timestamp with time zone, + PRIMARY KEY (id, project_id) + ) PARTITION BY HASH (project_id) + WITHOUT OIDS; + + CREATE INDEX index_product_analytics_events_experimental_project_and_time ON product_analytics_events_experimental (project_id, collector_tstamp); + SQL + + create_hash_partitions :product_analytics_events_experimental, 64 + end + end + + def down + with_lock_retries do + execute 'DROP TABLE product_analytics_events_experimental' + end + end +end diff --git a/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb b/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb new file mode 100644 index 00000000000..7d1b081be02 --- /dev/null +++ b/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddStorageSizeLimitToPlanLimit < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :plan_limits, :storage_size_limit, :integer, default: 0, null: false + end +end diff --git a/db/migrate/20200624142107_create_analytics_cycle_analytics_group_value_streams.rb b/db/migrate/20200624142107_create_analytics_cycle_analytics_group_value_streams.rb new file mode 100644 index 00000000000..24afe463684 --- /dev/null +++ b/db/migrate/20200624142107_create_analytics_cycle_analytics_group_value_streams.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +class CreateAnalyticsCycleAnalyticsGroupValueStreams < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_analytics_ca_group_value_streams_on_group_id_and_name' + + disable_ddl_transaction! + + def up + unless table_exists?(:analytics_cycle_analytics_group_value_streams) + with_lock_retries do + create_table :analytics_cycle_analytics_group_value_streams do |t| + t.timestamps_with_timezone + t.references(:group, { + null: false, + index: false, + foreign_key: { to_table: :namespaces, on_delete: :cascade } + }) + t.text :name, null: false + t.index [:group_id, :name], unique: true, name: INDEX_NAME + end + end + end + + add_text_limit :analytics_cycle_analytics_group_value_streams, :name, 100 + end + + def down + drop_table :analytics_cycle_analytics_group_value_streams + end +end diff --git a/db/migrate/20200624142207_add_group_value_stream_to_cycle_analytics_group_stages.rb b/db/migrate/20200624142207_add_group_value_stream_to_cycle_analytics_group_stages.rb new file mode 100644 index 00000000000..3ce912eb440 --- /dev/null +++ b/db/migrate/20200624142207_add_group_value_stream_to_cycle_analytics_group_stages.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddGroupValueStreamToCycleAnalyticsGroupStages < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :analytics_cycle_analytics_group_stages, :group_value_stream_id, :bigint + end + end + + def down + with_lock_retries do + remove_column :analytics_cycle_analytics_group_stages, :group_value_stream_id + end + end +end diff --git a/db/migrate/20200624222443_add_default_branch_name_to_application_settings.rb b/db/migrate/20200624222443_add_default_branch_name_to_application_settings.rb new file mode 100644 index 00000000000..5da9006e9a0 --- /dev/null +++ b/db/migrate/20200624222443_add_default_branch_name_to_application_settings.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class AddDefaultBranchNameToApplicationSettings < ActiveRecord::Migration[6.0] + DOWNTIME = false + + # rubocop:disable Migration/AddLimitToTextColumns + # limit is added in db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings + def change + add_column :application_settings, :default_branch_name, :text + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb b/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb new file mode 100644 index 00000000000..f4869b15735 --- /dev/null +++ b/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +class AddIdxAndFkForPrometheusAndEnvironmentToAlertManagementAlerts < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :alert_management_alerts, :prometheus_alert_id, where: 'prometheus_alert_id is not null' + add_concurrent_foreign_key :alert_management_alerts, :prometheus_alerts, column: :prometheus_alert_id, on_delete: :cascade + + add_concurrent_index :alert_management_alerts, :environment_id, where: 'environment_id is not null' + add_concurrent_foreign_key :alert_management_alerts, :environments, column: :environment_id, on_delete: :nullify + end + + def down + remove_concurrent_index :alert_management_alerts, :prometheus_alert_id + remove_foreign_key_without_error :alert_management_alerts, column: :prometheus_alert_id + + remove_concurrent_index :alert_management_alerts, :environment_id + remove_foreign_key_without_error :alert_management_alerts, column: :environment_id + end +end diff --git a/db/migrate/20200625082258_add_snippets_size_to_root_storage_statistics.rb b/db/migrate/20200625082258_add_snippets_size_to_root_storage_statistics.rb new file mode 100644 index 00000000000..7dd0bd94805 --- /dev/null +++ b/db/migrate/20200625082258_add_snippets_size_to_root_storage_statistics.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddSnippetsSizeToRootStorageStatistics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :namespace_root_storage_statistics, :snippets_size, :bigint, default: 0, null: false + end + end + + def down + with_lock_retries do + remove_column :namespace_root_storage_statistics, :snippets_size + end + end +end diff --git a/db/migrate/20200625113337_add_last_used_to_personal_access_tokens.rb b/db/migrate/20200625113337_add_last_used_to_personal_access_tokens.rb new file mode 100644 index 00000000000..c9d155eb628 --- /dev/null +++ b/db/migrate/20200625113337_add_last_used_to_personal_access_tokens.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddLastUsedToPersonalAccessTokens < ActiveRecord::Migration[6.0] + DOWNTIME = false + + include Gitlab::Database::MigrationHelpers + + def up + with_lock_retries do + add_column :personal_access_tokens, :last_used_at, :datetime_with_timezone + end + end + + def down + with_lock_retries do + remove_column :personal_access_tokens, :last_used_at, :datetime_with_timezone + end + end +end diff --git a/db/migrate/20200625174052_add_partial_index_to_locked_pipelines.rb b/db/migrate/20200625174052_add_partial_index_to_locked_pipelines.rb new file mode 100644 index 00000000000..85f706f5d31 --- /dev/null +++ b/db/migrate/20200625174052_add_partial_index_to_locked_pipelines.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddPartialIndexToLockedPipelines < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_pipelines, [:ci_ref_id, :id], name: 'idx_ci_pipelines_artifacts_locked', where: 'locked = 1' + end + + def down + remove_concurrent_index :ci_pipelines, 'idx_ci_pipelines_artifacts_locked' + end +end diff --git a/db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings.rb b/db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings.rb new file mode 100644 index 00000000000..b11eb514577 --- /dev/null +++ b/db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddLimitToDefaultBranchNameToApplicationSettings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_text_limit :application_settings, :default_branch_name, 255 + end + + def down + remove_text_limit :application_settings, :default_branch_name + end +end diff --git a/db/migrate/20200626130220_drop_partitions_dynamic_schema_if_exists.rb b/db/migrate/20200626130220_drop_partitions_dynamic_schema_if_exists.rb new file mode 100644 index 00000000000..fa31bc8ff0e --- /dev/null +++ b/db/migrate/20200626130220_drop_partitions_dynamic_schema_if_exists.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class DropPartitionsDynamicSchemaIfExists < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + # This targets GitLab.com only - we deployed a migration to create this schema, but reverted the change + execute 'DROP SCHEMA IF EXISTS partitions_dynamic' + end + + def down + # no-op + end +end diff --git a/db/migrate/20200628210938_add_maintenance_mode_application_to_settings.rb b/db/migrate/20200628210938_add_maintenance_mode_application_to_settings.rb new file mode 100644 index 00000000000..6f1959a128f --- /dev/null +++ b/db/migrate/20200628210938_add_maintenance_mode_application_to_settings.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class AddMaintenanceModeApplicationToSettings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + disable_ddl_transaction! + + def up + unless column_exists?(:application_settings, :maintenance_mode) + change_table :application_settings do |t| + t.boolean :maintenance_mode, default: false, null: false + t.text :maintenance_mode_message + end + end + + add_text_limit(:application_settings, :maintenance_mode_message, 255) + end + + def down + if column_exists?(:application_settings, :maintenance_mode) + remove_column :application_settings, :maintenance_mode + end + + if column_exists?(:application_settings, :maintenance_mode_message) + remove_column :application_settings, :maintenance_mode_message + end + end +end diff --git a/db/migrate/20200629192638_add_uniq_index_on_metric_identifier_and_project_id.rb b/db/migrate/20200629192638_add_uniq_index_on_metric_identifier_and_project_id.rb new file mode 100644 index 00000000000..3e77f80b5e8 --- /dev/null +++ b/db/migrate/20200629192638_add_uniq_index_on_metric_identifier_and_project_id.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddUniqIndexOnMetricIdentifierAndProjectId < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :prometheus_metrics, [:identifier, :project_id], unique: true + end + + def down + remove_concurrent_index :prometheus_metrics, [:identifier, :project_id] + end +end diff --git a/db/migrate/20200630091656_add_bio_html_to_user_details.rb b/db/migrate/20200630091656_add_bio_html_to_user_details.rb new file mode 100644 index 00000000000..6a9df85d6a4 --- /dev/null +++ b/db/migrate/20200630091656_add_bio_html_to_user_details.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +class AddBioHtmlToUserDetails < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + with_lock_retries do + # Note: bio_html is calculated from bio, the bio column is already constrained + add_column :user_details, :bio_html, :text # rubocop:disable Migration/AddLimitToTextColumns + add_column :user_details, :cached_markdown_version, :integer + end + end + + def down + with_lock_retries do + remove_column :user_details, :bio_html + remove_column :user_details, :cached_markdown_version + end + end +end diff --git a/db/migrate/20200630110826_add_documents_count_target_to_elastic_reindexing_tasks.rb b/db/migrate/20200630110826_add_documents_count_target_to_elastic_reindexing_tasks.rb new file mode 100644 index 00000000000..dcb4ccc857d --- /dev/null +++ b/db/migrate/20200630110826_add_documents_count_target_to_elastic_reindexing_tasks.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddDocumentsCountTargetToElasticReindexingTasks < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :elastic_reindexing_tasks, :documents_count_target, :integer + end +end diff --git a/db/migrate/20200701064756_add_not_valid_foreign_key_to_cycle_analytics_group_stages.rb b/db/migrate/20200701064756_add_not_valid_foreign_key_to_cycle_analytics_group_stages.rb new file mode 100644 index 00000000000..e54cecc5af8 --- /dev/null +++ b/db/migrate/20200701064756_add_not_valid_foreign_key_to_cycle_analytics_group_stages.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class AddNotValidForeignKeyToCycleAnalyticsGroupStages < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + CONSTRAINT_NAME = 'fk_analytics_cycle_analytics_group_stages_group_value_stream_id' + INDEX_NAME = 'index_analytics_ca_group_stages_on_value_stream_id' + + disable_ddl_transaction! + + def up + add_concurrent_index :analytics_cycle_analytics_group_stages, :group_value_stream_id, name: INDEX_NAME + add_foreign_key :analytics_cycle_analytics_group_stages, :analytics_cycle_analytics_group_value_streams, + column: :group_value_stream_id, name: CONSTRAINT_NAME, on_delete: :cascade, validate: false + end + + def down + remove_foreign_key_if_exists :analytics_cycle_analytics_group_stages, column: :group_value_stream_id, name: CONSTRAINT_NAME + remove_concurrent_index :analytics_cycle_analytics_group_stages, :group_value_stream_id + end +end diff --git a/db/migrate/20200701093859_add_import_export_limits_to_application_settings.rb b/db/migrate/20200701093859_add_import_export_limits_to_application_settings.rb new file mode 100644 index 00000000000..6f40f439385 --- /dev/null +++ b/db/migrate/20200701093859_add_import_export_limits_to_application_settings.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddImportExportLimitsToApplicationSettings < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :application_settings, :project_import_limit, :integer, default: 6, null: false + add_column :application_settings, :project_export_limit, :integer, default: 6, null: false + add_column :application_settings, :project_download_export_limit, :integer, default: 1, null: false + + add_column :application_settings, :group_import_limit, :integer, default: 6, null: false + add_column :application_settings, :group_export_limit, :integer, default: 6, null: false + add_column :application_settings, :group_download_export_limit, :integer, default: 1, null: false + end +end diff --git a/db/migrate/20200701190523_add_delayed_project_removal_to_namespaces.rb b/db/migrate/20200701190523_add_delayed_project_removal_to_namespaces.rb new file mode 100644 index 00000000000..2d5bbc1cba1 --- /dev/null +++ b/db/migrate/20200701190523_add_delayed_project_removal_to_namespaces.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddDelayedProjectRemovalToNamespaces < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :namespaces, :delayed_project_removal, :boolean, default: false, null: false + end + end + + def down + with_lock_retries do + remove_column :namespaces, :delayed_project_removal + end + end +end diff --git a/db/migrate/20200701205710_create_background_migration_jobs.rb b/db/migrate/20200701205710_create_background_migration_jobs.rb new file mode 100644 index 00000000000..706b8bd5abe --- /dev/null +++ b/db/migrate/20200701205710_create_background_migration_jobs.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class CreateBackgroundMigrationJobs < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + unless table_exists?(:background_migration_jobs) + create_table :background_migration_jobs do |t| + t.timestamps_with_timezone + t.integer :status, null: false, limit: 2, default: 0 + t.text :class_name, null: false + t.jsonb :arguments, null: false + + t.index [:class_name, :arguments] + t.index [:class_name, :status, :id] + end + end + + add_text_limit :background_migration_jobs, :class_name, 200 + end + + def down + drop_table :background_migration_jobs + end +end diff --git a/db/migrate/20200702123805_change_project_id_index_to_be_unique_on_vulnerability_statistics_table.rb b/db/migrate/20200702123805_change_project_id_index_to_be_unique_on_vulnerability_statistics_table.rb new file mode 100644 index 00000000000..7562a32a25e --- /dev/null +++ b/db/migrate/20200702123805_change_project_id_index_to_be_unique_on_vulnerability_statistics_table.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class ChangeProjectIdIndexToBeUniqueOnVulnerabilityStatisticsTable < ActiveRecord::Migration[6.0] + DOWNTIME = false + + INDEX_NAME = 'index_vulnerability_statistics_on_unique_project_id' + + def up + remove_index :vulnerability_statistics, :project_id # rubocop:disable Migration/RemoveIndex (table is empty) + add_index :vulnerability_statistics, :project_id, name: INDEX_NAME, unique: true # rubocop:disable Migration/AddIndex (table is empty) + end + + def down + remove_index :vulnerability_statistics, name: INDEX_NAME # rubocop:disable Migration/RemoveIndex (table is empty) + add_index :vulnerability_statistics, :project_id # rubocop:disable Migration/AddIndex (table is empty) + end +end diff --git a/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb b/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb new file mode 100644 index 00000000000..248195c8c75 --- /dev/null +++ b/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class ChangePrometheusMetricsIdentifierIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + NEW_INDEX = :index_prometheus_metrics_on_identifier_and_null_project + OLD_INDEX = :index_prometheus_metrics_on_identifier + + disable_ddl_transaction! + + def up + add_concurrent_index :prometheus_metrics, :identifier, name: NEW_INDEX, unique: true, where: 'project_id IS NULL' + remove_concurrent_index_by_name :prometheus_metrics, OLD_INDEX + end + + def down + add_concurrent_index :prometheus_metrics, :identifier, name: OLD_INDEX, unique: true + remove_concurrent_index_by_name :prometheus_metrics, NEW_INDEX + end +end diff --git a/db/migrate/20200703121557_remove_f_keys_from_ci_daily_report_results_table.rb b/db/migrate/20200703121557_remove_f_keys_from_ci_daily_report_results_table.rb new file mode 100644 index 00000000000..43b869b007d --- /dev/null +++ b/db/migrate/20200703121557_remove_f_keys_from_ci_daily_report_results_table.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class RemoveFKeysFromCiDailyReportResultsTable < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + with_lock_retries do + remove_foreign_key_if_exists :ci_daily_report_results, :projects + remove_foreign_key_if_exists :ci_daily_report_results, :ci_pipelines + end + end + + def down + add_concurrent_foreign_key :ci_daily_report_results, :projects, column: :project_id, on_delete: :cascade + add_concurrent_foreign_key :ci_daily_report_results, :ci_pipelines, column: :last_pipeline_id, on_delete: :cascade + end +end diff --git a/db/migrate/20200703124823_create_namespace_settings.rb b/db/migrate/20200703124823_create_namespace_settings.rb new file mode 100644 index 00000000000..907b9d2ca8c --- /dev/null +++ b/db/migrate/20200703124823_create_namespace_settings.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class CreateNamespaceSettings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + with_lock_retries do + create_table :namespace_settings, id: false do |t| + t.timestamps_with_timezone null: false + t.references :namespace, primary_key: true, default: nil, type: :integer, index: false, foreign_key: { on_delete: :cascade } + end + end + end + + def down + drop_table :namespace_settings + end +end diff --git a/db/migrate/20200703154822_add_issues_enabled_to_jira_tracker_data.rb b/db/migrate/20200703154822_add_issues_enabled_to_jira_tracker_data.rb new file mode 100644 index 00000000000..e56f6f6ee11 --- /dev/null +++ b/db/migrate/20200703154822_add_issues_enabled_to_jira_tracker_data.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddIssuesEnabledToJiraTrackerData < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :jira_tracker_data, :issues_enabled, :boolean, default: false, null: false + end +end diff --git a/db/migrate/20200706005325_remove_elastic_batch_project_indexer_worker_queue.rb b/db/migrate/20200706005325_remove_elastic_batch_project_indexer_worker_queue.rb new file mode 100644 index 00000000000..07854096a8b --- /dev/null +++ b/db/migrate/20200706005325_remove_elastic_batch_project_indexer_worker_queue.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class RemoveElasticBatchProjectIndexerWorkerQueue < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + Sidekiq.redis do |conn| + conn.del "queue:elastic_batch_project_indexer" + end + end +end diff --git a/db/migrate/20200706035141_adjust_unique_index_alert_management_alerts.rb b/db/migrate/20200706035141_adjust_unique_index_alert_management_alerts.rb new file mode 100644 index 00000000000..0a6e614be9a --- /dev/null +++ b/db/migrate/20200706035141_adjust_unique_index_alert_management_alerts.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +class AdjustUniqueIndexAlertManagementAlerts < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_alert_management_alerts_on_project_id_and_fingerprint' + NEW_INDEX_NAME = 'index_partial_am_alerts_on_project_id_and_fingerprint' + RESOLVED_STATUS = 2 + + disable_ddl_transaction! + + def up + add_concurrent_index(:alert_management_alerts, %w(project_id fingerprint), where: "status <> #{RESOLVED_STATUS}", name: NEW_INDEX_NAME, unique: true, using: :btree) + remove_concurrent_index_by_name :alert_management_alerts, INDEX_NAME + end + + def down + # Nullify duplicate fingerprints, except for the newest of each match (project_id, fingerprint). + query = <<-SQL + UPDATE alert_management_alerts am + SET fingerprint = NULL + WHERE am.created_at <> + (SELECT MAX(created_at) + FROM alert_management_alerts am2 + WHERE am.fingerprint = am2.fingerprint AND am.project_id = am2.project_id) + AND am.fingerprint IS NOT NULL; + SQL + + execute(query) + + remove_concurrent_index_by_name :alert_management_alerts, NEW_INDEX_NAME + add_concurrent_index(:alert_management_alerts, %w(project_id fingerprint), name: INDEX_NAME, unique: true, using: :btree) + end +end diff --git a/db/migrate/20200706170536_add_temporary_storage_increase_to_namespace_limits.rb b/db/migrate/20200706170536_add_temporary_storage_increase_to_namespace_limits.rb new file mode 100644 index 00000000000..0b6d57831c7 --- /dev/null +++ b/db/migrate/20200706170536_add_temporary_storage_increase_to_namespace_limits.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddTemporaryStorageIncreaseToNamespaceLimits < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :namespace_limits, :temporary_storage_increase_ends_on, :date, null: true + end +end diff --git a/db/migrate/20200707071941_drop_old_non_unique_index_on_mr_metrics.rb b/db/migrate/20200707071941_drop_old_non_unique_index_on_mr_metrics.rb new file mode 100644 index 00000000000..aa90a0c5915 --- /dev/null +++ b/db/migrate/20200707071941_drop_old_non_unique_index_on_mr_metrics.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class DropOldNonUniqueIndexOnMrMetrics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_merge_request_metrics' + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name(:merge_request_metrics, INDEX_NAME) + end + + def down + add_concurrent_index :merge_request_metrics, :merge_request_id, name: INDEX_NAME + end +end diff --git a/db/migrate/20200707094341_add_browser_performance_to_plan_limits.rb b/db/migrate/20200707094341_add_browser_performance_to_plan_limits.rb new file mode 100644 index 00000000000..ef0bea88ead --- /dev/null +++ b/db/migrate/20200707094341_add_browser_performance_to_plan_limits.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddBrowserPerformanceToPlanLimits < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :plan_limits, "ci_max_artifact_size_browser_performance", :integer, default: 0, null: false + end +end diff --git a/db/migrate/20200707095849_add_load_performance_to_plan_limits.rb b/db/migrate/20200707095849_add_load_performance_to_plan_limits.rb new file mode 100644 index 00000000000..df95956f089 --- /dev/null +++ b/db/migrate/20200707095849_add_load_performance_to_plan_limits.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddLoadPerformanceToPlanLimits < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :plan_limits, "ci_max_artifact_size_load_performance", :integer, default: 0, null: false + end +end diff --git a/db/migrate/20200708080631_add_pager_duty_integration_columns_to_project_incident_management_settings.rb b/db/migrate/20200708080631_add_pager_duty_integration_columns_to_project_incident_management_settings.rb new file mode 100644 index 00000000000..ab56a863f51 --- /dev/null +++ b/db/migrate/20200708080631_add_pager_duty_integration_columns_to_project_incident_management_settings.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddPagerDutyIntegrationColumnsToProjectIncidentManagementSettings < ActiveRecord::Migration[6.0] + DOWNTIME = false + + # limit constraints added in a separate migration: + # 20200710130234_add_limit_constraints_to_project_incident_management_settings_token.rb + def change + add_column :project_incident_management_settings, :pagerduty_active, :boolean, null: false, default: false + add_column :project_incident_management_settings, :encrypted_pagerduty_token, :binary, null: true + add_column :project_incident_management_settings, :encrypted_pagerduty_token_iv, :binary, null: true + end +end diff --git a/db/migrate/20200710105332_change_issues_create_limit_default.rb b/db/migrate/20200710105332_change_issues_create_limit_default.rb new file mode 100644 index 00000000000..9fbd5375395 --- /dev/null +++ b/db/migrate/20200710105332_change_issues_create_limit_default.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class ChangeIssuesCreateLimitDefault < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + change_column_default :application_settings, :issues_create_limit, from: 300, to: 0 + end + end + + def down + with_lock_retries do + change_column_default :application_settings, :issues_create_limit, from: 0, to: 300 + end + end +end diff --git a/db/migrate/20200710130234_add_limit_constraints_to_project_incident_management_settings_token.rb b/db/migrate/20200710130234_add_limit_constraints_to_project_incident_management_settings_token.rb new file mode 100644 index 00000000000..8af927d0959 --- /dev/null +++ b/db/migrate/20200710130234_add_limit_constraints_to_project_incident_management_settings_token.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddLimitConstraintsToProjectIncidentManagementSettingsToken < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_check_constraint :project_incident_management_settings, 'octet_length(encrypted_pagerduty_token) <= 255', 'pagerduty_token_length_constraint' + add_check_constraint :project_incident_management_settings, 'octet_length(encrypted_pagerduty_token_iv) <= 12', 'pagerduty_token_iv_length_constraint' + end + + def down + remove_check_constraint :project_incident_management_settings, 'pagerduty_token_length_constraint' + remove_check_constraint :project_incident_management_settings, 'pagerduty_token_iv_length_constraint' + end +end diff --git a/db/migrate/20200712084655_create_dast_sites.rb b/db/migrate/20200712084655_create_dast_sites.rb new file mode 100644 index 00000000000..fc8d423ffb2 --- /dev/null +++ b/db/migrate/20200712084655_create_dast_sites.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class CreateDastSites < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + with_lock_retries do + create_table :dast_sites do |t| + t.references :project, foreign_key: { on_delete: :cascade }, null: false, index: false + t.timestamps_with_timezone null: false + + t.text :url, null: false + end + end + + add_concurrent_index :dast_sites, [:project_id, :url], unique: true + add_text_limit :dast_sites, :url, 255 + end + + def down + drop_table :dast_sites + end +end diff --git a/db/migrate/20200712235622_create_dast_site_profiles.rb b/db/migrate/20200712235622_create_dast_site_profiles.rb new file mode 100644 index 00000000000..593cccd450a --- /dev/null +++ b/db/migrate/20200712235622_create_dast_site_profiles.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +class CreateDastSiteProfiles < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + with_lock_retries do + create_table :dast_site_profiles do |t| + t.references :project, foreign_key: { on_delete: :cascade }, null: false, index: false + t.references :dast_site, foreign_key: { on_delete: :cascade }, null: false + t.timestamps_with_timezone null: false + + t.text :name, null: false + end + end + + add_concurrent_index :dast_site_profiles, [:project_id, :name], unique: true + add_text_limit :dast_site_profiles, :name, 255 + end + + def down + drop_table :dast_site_profiles + end +end diff --git a/db/migrate/20200713152443_add_background_migration_job_index_for_partitioning_migrations.rb b/db/migrate/20200713152443_add_background_migration_job_index_for_partitioning_migrations.rb new file mode 100644 index 00000000000..5ca9b6536ee --- /dev/null +++ b/db/migrate/20200713152443_add_background_migration_job_index_for_partitioning_migrations.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddBackgroundMigrationJobIndexForPartitioningMigrations < ActiveRecord::Migration[6.0] + DOWNTIME = false + + INDEX_NAME = 'index_background_migration_jobs_for_partitioning_migrations' + + def up + # rubocop:disable Migration/AddIndex + add_index :background_migration_jobs, '((arguments ->> 2))', name: INDEX_NAME, + where: "class_name = 'Gitlab::Database::PartitioningMigrationHelpers::BackfillPartitionedTable'" + # rubocop:enable Migration/AddIndex + end + + def down + remove_index :background_migration_jobs, name: INDEX_NAME # rubocop:disable Migration/RemoveIndex + end +end diff --git a/db/migrate/20200716044023_add_entity_path_to_audit_events.rb b/db/migrate/20200716044023_add_entity_path_to_audit_events.rb new file mode 100644 index 00000000000..d16bfaa0beb --- /dev/null +++ b/db/migrate/20200716044023_add_entity_path_to_audit_events.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddEntityPathToAuditEvents < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + # rubocop:disable Migration/AddLimitToTextColumns + add_column(:audit_events, :entity_path, :text) + # rubocop:enable Migration/AddLimitToTextColumns + end + end + + def down + with_lock_retries do + remove_column(:audit_events, :entity_path) + end + end +end diff --git a/db/migrate/20200716120419_add_text_limit_on_entity_path_to_audit_events.rb b/db/migrate/20200716120419_add_text_limit_on_entity_path_to_audit_events.rb new file mode 100644 index 00000000000..0dea811f41c --- /dev/null +++ b/db/migrate/20200716120419_add_text_limit_on_entity_path_to_audit_events.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddTextLimitOnEntityPathToAuditEvents < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_text_limit :audit_events, :entity_path, 5_500 + end + + def down + remove_text_limit :audit_events, :entity_path + end +end diff --git a/db/post_migrate/20200305082754_remove_duplicate_labels_from_project.rb b/db/post_migrate/20200305082754_remove_duplicate_labels_from_project.rb new file mode 100644 index 00000000000..33f8118534d --- /dev/null +++ b/db/post_migrate/20200305082754_remove_duplicate_labels_from_project.rb @@ -0,0 +1,130 @@ +# frozen_string_literal: true + +class RemoveDuplicateLabelsFromProject < ActiveRecord::Migration[6.0] + DOWNTIME = false + + CREATE = 1 + RENAME = 2 + + disable_ddl_transaction! + + class BackupLabel < Label + self.table_name = 'backup_labels' + end + + class Label < ApplicationRecord + self.table_name = 'labels' + end + + class Project < ApplicationRecord + include EachBatch + + self.table_name = 'projects' + end + + BATCH_SIZE = 100_000 + + def up + # Split to smaller chunks + # Loop rather than background job, every 100,000 + # there are 45,000,000 projects in total + Project.each_batch(of: BATCH_SIZE) do |batch| + range = batch.pluck('MIN(id)', 'MAX(id)').first + + transaction do + remove_full_duplicates(*range) + end + + transaction do + rename_partial_duplicates(*range) + end + end + end + + def down + Project.each_batch(of: BATCH_SIZE) do |batch| + range = batch.pluck('MIN(id)', 'MAX(id)').first + + restore_renamed_labels(*range) + restore_deleted_labels(*range) + end + end + + def remove_full_duplicates(start_id, stop_id) + # Fields that are considered duplicate: + # project_id title template description type color + + duplicate_labels = ApplicationRecord.connection.execute(<<-SQL.squish) +WITH data AS ( + SELECT labels.*, + row_number() OVER (PARTITION BY labels.project_id, labels.title, labels.template, labels.description, labels.type, labels.color ORDER BY labels.id) AS row_number, + #{CREATE} AS restore_action + FROM labels + WHERE labels.project_id BETWEEN #{start_id} AND #{stop_id} + AND NOT EXISTS (SELECT * FROM board_labels WHERE board_labels.label_id = labels.id) + AND NOT EXISTS (SELECT * FROM label_links WHERE label_links.label_id = labels.id) + AND NOT EXISTS (SELECT * FROM label_priorities WHERE label_priorities.label_id = labels.id) + AND NOT EXISTS (SELECT * FROM lists WHERE lists.label_id = labels.id) + AND NOT EXISTS (SELECT * FROM resource_label_events WHERE resource_label_events.label_id = labels.id) +) SELECT * FROM data WHERE row_number > 1; + SQL + + if duplicate_labels.any? + # create backup records + BackupLabel.insert_all!(duplicate_labels.map { |label| label.except("row_number") }) + + Label.where(id: duplicate_labels.pluck("id")).delete_all + end + end + + def rename_partial_duplicates(start_id, stop_id) + # We need to ensure that the new title (with `_duplicate#{ID}`) doesn't exceed the limit. + # Truncate the original title (if needed) to 245 characters minus the length of the ID + # then add `_duplicate#{ID}` + + soft_duplicates = ApplicationRecord.connection.execute(<<-SQL.squish) +WITH data AS ( + SELECT + *, + substring(title from 1 for 245 - length(id::text)) || '_duplicate' || id::text as new_title, + #{RENAME} AS restore_action, + row_number() OVER (PARTITION BY project_id, title ORDER BY id) AS row_number + FROM labels + WHERE project_id BETWEEN #{start_id} AND #{stop_id} +) SELECT * FROM data WHERE row_number > 1; + SQL + + if soft_duplicates.any? + # create backup records + BackupLabel.insert_all!(soft_duplicates.map { |label| label.except("row_number") }) + + ApplicationRecord.connection.execute(<<-SQL.squish) +UPDATE labels SET title = substring(title from 1 for 245 - length(id::text)) || '_duplicate' || id::text +WHERE labels.id IN (#{soft_duplicates.map { |dup| dup["id"] }.join(", ")}); + SQL + end + end + + def restore_renamed_labels(start_id, stop_id) + # the backup label IDs are not incremental, they are copied directly from the Labels table + ApplicationRecord.connection.execute(<<-SQL.squish) +WITH backups AS ( + SELECT id, title + FROM backup_labels + WHERE project_id BETWEEN #{start_id} AND #{stop_id} AND + restore_action = #{RENAME} +) UPDATE labels SET title = backups.title +FROM backups +WHERE labels.id = backups.id; + SQL + end + + def restore_deleted_labels(start_id, stop_id) + ActiveRecord::Base.connection.execute(<<-SQL.squish) +INSERT INTO labels +SELECT id, title, color, project_id, created_at, updated_at, template, description, description_html, type, group_id, cached_markdown_version FROM backup_labels + WHERE backup_labels.project_id BETWEEN #{start_id} AND #{stop_id} + AND backup_labels.restore_action = #{CREATE} + SQL + end +end diff --git a/db/post_migrate/20200305082858_add_uniqueness_index_to_label_title_and_project.rb b/db/post_migrate/20200305082858_add_uniqueness_index_to_label_title_and_project.rb new file mode 100644 index 00000000000..ce235ba4aea --- /dev/null +++ b/db/post_migrate/20200305082858_add_uniqueness_index_to_label_title_and_project.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddUniquenessIndexToLabelTitleAndProject < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + PROJECT_AND_TITLE = [:project_id, :title] + + def up + add_concurrent_index :labels, PROJECT_AND_TITLE, where: "labels.group_id IS NULL", unique: true, name: "index_labels_on_project_id_and_title_unique" + remove_concurrent_index :labels, PROJECT_AND_TITLE, name: "index_labels_on_project_id_and_title" + end + + def down + add_concurrent_index :labels, PROJECT_AND_TITLE, where: "labels.group_id IS NULL", unique: false, name: "index_labels_on_project_id_and_title" + remove_concurrent_index :labels, PROJECT_AND_TITLE, name: "index_labels_on_project_id_and_title_unique" + end +end diff --git a/db/post_migrate/20200519201128_migrate_vulnerability_dismissal_feedback.rb b/db/post_migrate/20200519201128_migrate_vulnerability_dismissal_feedback.rb new file mode 100644 index 00000000000..fee2f59abb5 --- /dev/null +++ b/db/post_migrate/20200519201128_migrate_vulnerability_dismissal_feedback.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +class MigrateVulnerabilityDismissalFeedback < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + disable_ddl_transaction! + + MIGRATION = 'UpdateVulnerabilitiesFromDismissalFeedback' + BATCH_SIZE = 500 + DELAY_INTERVAL = 2.minutes.to_i + + class Vulnerability < ActiveRecord::Base + self.table_name = 'vulnerabilities' + self.inheritance_column = :_type_disabled + + include ::EachBatch + end + + def up + return unless Gitlab.ee? + + Vulnerability.select('project_id').group(:project_id).each_batch(of: BATCH_SIZE, column: "project_id") do |project_batch, index| + batch_delay = (index - 1) * BATCH_SIZE * DELAY_INTERVAL + + project_batch.each_with_index do |project, project_batch_index| + project_delay = project_batch_index * DELAY_INTERVAL + migrate_in(batch_delay + project_delay, MIGRATION, project[:project_id]) + end + end + end + + def down + # nothing to do + end +end diff --git a/db/post_migrate/20200526115436_dedup_mr_metrics.rb b/db/post_migrate/20200526115436_dedup_mr_metrics.rb new file mode 100644 index 00000000000..d2660504939 --- /dev/null +++ b/db/post_migrate/20200526115436_dedup_mr_metrics.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +class DedupMrMetrics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + TMP_INDEX_NAME = 'tmp_unique_merge_request_metrics_by_merge_request_id' + INDEX_NAME = 'unique_merge_request_metrics_by_merge_request_id' + + disable_ddl_transaction! + + class MergeRequestMetrics < ActiveRecord::Base + self.table_name = 'merge_request_metrics' + + include EachBatch + end + + def up + last_metrics_record_id = MergeRequestMetrics.maximum(:id) || 0 + + # This index will disallow further duplicates while we're deduplicating the data. + add_concurrent_index(:merge_request_metrics, :merge_request_id, where: "id > #{Integer(last_metrics_record_id)}", unique: true, name: TMP_INDEX_NAME) + + MergeRequestMetrics.each_batch do |relation| + duplicated_merge_request_ids = MergeRequestMetrics + .where(merge_request_id: relation.select(:merge_request_id)) + .select(:merge_request_id) + .group(:merge_request_id) + .having('COUNT(merge_request_metrics.merge_request_id) > 1') + .pluck(:merge_request_id) + + duplicated_merge_request_ids.each do |merge_request_id| + deduplicate_item(merge_request_id) + end + end + + add_concurrent_index(:merge_request_metrics, :merge_request_id, unique: true, name: INDEX_NAME) + remove_concurrent_index_by_name(:merge_request_metrics, TMP_INDEX_NAME) + end + + def down + remove_concurrent_index_by_name(:merge_request_metrics, TMP_INDEX_NAME) + remove_concurrent_index_by_name(:merge_request_metrics, INDEX_NAME) + end + + private + + def deduplicate_item(merge_request_id) + merge_request_metrics_records = MergeRequestMetrics.where(merge_request_id: merge_request_id).order(updated_at: :asc).to_a + + attributes = {} + merge_request_metrics_records.each do |merge_request_metrics_record| + params = merge_request_metrics_record.attributes.except('id') + attributes.merge!(params.compact) + end + + ActiveRecord::Base.transaction do + record_to_keep = merge_request_metrics_records.pop + records_to_delete = merge_request_metrics_records + + MergeRequestMetrics.where(id: records_to_delete.map(&:id)).delete_all + record_to_keep.update!(attributes) + end + end +end diff --git a/db/post_migrate/20200608195222_set_lock_version_not_null_constraint.rb b/db/post_migrate/20200608195222_set_lock_version_not_null_constraint.rb new file mode 100644 index 00000000000..ec72053b307 --- /dev/null +++ b/db/post_migrate/20200608195222_set_lock_version_not_null_constraint.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class SetLockVersionNotNullConstraint < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + TABLES = %i(epics merge_requests issues ci_stages ci_builds ci_pipelines).freeze + + def up + TABLES.each do |table| + add_not_null_constraint table, :lock_version, validate: false + end + end + + def down + TABLES.each do |table| + remove_not_null_constraint table, :lock_version + end + end +end diff --git a/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb b/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb new file mode 100644 index 00000000000..924ca73e6cc --- /dev/null +++ b/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class SetProperLockVersionIndices < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + remove_concurrent_index :epics, :lock_version, where: "lock_version IS NULL" + remove_concurrent_index :merge_requests, :lock_version, where: "lock_version IS NULL" + remove_concurrent_index :issues, :lock_version, where: "lock_version IS NULL" + + add_concurrent_index :epics, :id, where: "lock_version IS NULL", name: 'index_epics_on_id' + add_concurrent_index :merge_requests, :id, where: "lock_version IS NULL", name: 'index_merge_requests_on_id' + add_concurrent_index :issues, :id, where: "lock_version IS NULL", name: 'index_issues_on_id' + end + + def down + add_concurrent_index :epics, :lock_version, where: "lock_version IS NULL" + add_concurrent_index :merge_requests, :lock_version, where: "lock_version IS NULL" + add_concurrent_index :issues, :lock_version, where: "lock_version IS NULL" + + remove_concurrent_index_by_name :epics, name: 'index_epics_on_id' + remove_concurrent_index_by_name :merge_requests, name: 'index_merge_requests_on_id' + remove_concurrent_index_by_name :issues, name: 'index_issues_on_id' + end +end diff --git a/db/post_migrate/20200608205813_set_lock_version_to_not_null.rb b/db/post_migrate/20200608205813_set_lock_version_to_not_null.rb new file mode 100644 index 00000000000..69f43a8decf --- /dev/null +++ b/db/post_migrate/20200608205813_set_lock_version_to_not_null.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +class SetLockVersionToNotNull < ActiveRecord::Migration[6.0] + DOWNTIME = false + + TABLES = %w(epics merge_requests issues ci_stages ci_builds ci_pipelines).freeze + BATCH_SIZE = 10_000 + + disable_ddl_transaction! + + def declare_class(table) + Class.new(ActiveRecord::Base) do + include EachBatch + + self.table_name = table + self.inheritance_column = :_type_disabled # Disable STI + end + end + + def up + TABLES.each do |table| + declare_class(table).where(lock_version: nil).each_batch(of: BATCH_SIZE) do |batch| + batch.update_all(lock_version: 0) + end + end + end + + def down + # Nothing to do... + end +end diff --git a/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb b/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb new file mode 100644 index 00000000000..aafa6a83200 --- /dev/null +++ b/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class LockVersionCleanupForEpics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + validate_not_null_constraint :epics, :lock_version + remove_concurrent_index_by_name :epics, name: 'index_epics_on_id' + end + + def down + add_concurrent_index :epics, :id, where: "lock_version IS NULL", name: 'index_epics_on_id' + end +end diff --git a/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb b/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb new file mode 100644 index 00000000000..cb8ab86b6a3 --- /dev/null +++ b/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class LockVersionCleanupForMergeRequests < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + validate_not_null_constraint :merge_requests, :lock_version + remove_concurrent_index_by_name :merge_requests, name: 'index_merge_requests_on_id' + end + + def down + add_concurrent_index :merge_requests, :id, where: "lock_version IS NULL", name: 'index_merge_requests_on_id' + end +end diff --git a/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb b/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb new file mode 100644 index 00000000000..ad3fea8b131 --- /dev/null +++ b/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class LockVersionCleanupForIssues < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + validate_not_null_constraint :issues, :lock_version + remove_concurrent_index_by_name :issues, name: 'index_issues_on_id' + end + + def down + add_concurrent_index :issues, :id, where: "lock_version IS NULL", name: 'index_issues_on_id' + end +end diff --git a/db/post_migrate/20200608212652_lock_version_cleanup_for_ci_stages.rb b/db/post_migrate/20200608212652_lock_version_cleanup_for_ci_stages.rb new file mode 100644 index 00000000000..12e2897123e --- /dev/null +++ b/db/post_migrate/20200608212652_lock_version_cleanup_for_ci_stages.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class LockVersionCleanupForCiStages < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + validate_not_null_constraint :ci_stages, :lock_version + remove_concurrent_index :ci_stages, :id, where: "lock_version IS NULL", name: "tmp_index_ci_stages_lock_version" + end + + def down + add_concurrent_index :ci_stages, :id, where: "lock_version IS NULL", name: "tmp_index_ci_stages_lock_version" + end +end diff --git a/db/post_migrate/20200608212807_lock_version_cleanup_for_ci_builds.rb b/db/post_migrate/20200608212807_lock_version_cleanup_for_ci_builds.rb new file mode 100644 index 00000000000..0512869971b --- /dev/null +++ b/db/post_migrate/20200608212807_lock_version_cleanup_for_ci_builds.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class LockVersionCleanupForCiBuilds < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + validate_not_null_constraint :ci_builds, :lock_version + remove_concurrent_index :ci_builds, :id, where: "lock_version IS NULL", name: "tmp_index_ci_builds_lock_version" + end + + def down + add_concurrent_index :ci_builds, :id, where: "lock_version IS NULL", name: "tmp_index_ci_builds_lock_version" + end +end diff --git a/db/post_migrate/20200608212824_lock_version_cleanup_for_ci_pipelines.rb b/db/post_migrate/20200608212824_lock_version_cleanup_for_ci_pipelines.rb new file mode 100644 index 00000000000..228dd72da8d --- /dev/null +++ b/db/post_migrate/20200608212824_lock_version_cleanup_for_ci_pipelines.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class LockVersionCleanupForCiPipelines < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + validate_not_null_constraint :ci_pipelines, :lock_version + remove_concurrent_index :ci_pipelines, :id, where: "lock_version IS NULL", name: "tmp_index_ci_pipelines_lock_version" + end + + def down + add_concurrent_index :ci_pipelines, :id, where: "lock_version IS NULL", name: "tmp_index_ci_pipelines_lock_version" + end +end diff --git a/db/post_migrate/20200609002841_add_partial_index_on_locked_state_id_to_merge_requests.rb b/db/post_migrate/20200609002841_add_partial_index_on_locked_state_id_to_merge_requests.rb index 076c8fd8715..7602ad00796 100644 --- a/db/post_migrate/20200609002841_add_partial_index_on_locked_state_id_to_merge_requests.rb +++ b/db/post_migrate/20200609002841_add_partial_index_on_locked_state_id_to_merge_requests.rb @@ -14,6 +14,6 @@ class AddPartialIndexOnLockedStateIdToMergeRequests < ActiveRecord::Migration[6. end def down - remove_concurrent_index_by_name :merge_requests, name: INDEX_NAME + remove_concurrent_index_by_name :merge_requests, INDEX_NAME end end diff --git a/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb b/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb new file mode 100644 index 00000000000..41280872a94 --- /dev/null +++ b/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +class UnconfirmWrongfullyVerifiedEmails < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + INTERVAL = 5.minutes.to_i + BATCH_SIZE = 500 + MIGRATION = 'WrongfullyConfirmedEmailUnconfirmer' + EMAIL_INDEX_NAME = 'tmp_index_for_email_unconfirmation_migration' + + class Email < ActiveRecord::Base + include EachBatch + end + + def up + add_concurrent_index :emails, :id, where: 'confirmed_at IS NOT NULL', name: EMAIL_INDEX_NAME + + queue_background_migration_jobs_by_range_at_intervals(Email, + MIGRATION, + INTERVAL, + batch_size: BATCH_SIZE) + end + + def down + remove_concurrent_index_by_name(:emails, EMAIL_INDEX_NAME) + end +end diff --git a/db/migrate/20190225160300_steal_encrypt_runners_tokens.rb b/db/post_migrate/20200617001637_validate_file_store_not_null_constraint_on_lfs_objects.rb index 18c0d2a2e1b..27a30b1d696 100644 --- a/db/migrate/20190225160300_steal_encrypt_runners_tokens.rb +++ b/db/post_migrate/20200617001637_validate_file_store_not_null_constraint_on_lfs_objects.rb @@ -1,16 +1,14 @@ # frozen_string_literal: true -class StealEncryptRunnersTokens < ActiveRecord::Migration[5.0] +class ValidateFileStoreNotNullConstraintOnLfsObjects < ActiveRecord::Migration[6.0] include Gitlab::Database::MigrationHelpers - # This cleans after `EncryptRunnersTokens` - DOWNTIME = false disable_ddl_transaction! def up - Gitlab::BackgroundMigration.steal('EncryptRunnersTokens') + validate_check_constraint(:lfs_objects, :check_eecfc5717d) end def down diff --git a/db/post_migrate/20200617001848_validate_store_not_null_constraint_uploads.rb b/db/post_migrate/20200617001848_validate_store_not_null_constraint_uploads.rb new file mode 100644 index 00000000000..83cb6cb3e85 --- /dev/null +++ b/db/post_migrate/20200617001848_validate_store_not_null_constraint_uploads.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class ValidateStoreNotNullConstraintUploads < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + validate_check_constraint(:uploads, :check_5e9547379c) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20200617002030_validate_file_store_not_null_constraint_on_ci_job_artifacts.rb b/db/post_migrate/20200617002030_validate_file_store_not_null_constraint_on_ci_job_artifacts.rb new file mode 100644 index 00000000000..8e766a508b7 --- /dev/null +++ b/db/post_migrate/20200617002030_validate_file_store_not_null_constraint_on_ci_job_artifacts.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class ValidateFileStoreNotNullConstraintOnCiJobArtifacts < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + validate_check_constraint(:ci_job_artifacts, :check_27f0f6dbab) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20200618152212_update_secure_smau_index.rb b/db/post_migrate/20200618152212_update_secure_smau_index.rb new file mode 100644 index 00000000000..ba989c279be --- /dev/null +++ b/db/post_migrate/20200618152212_update_secure_smau_index.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class UpdateSecureSmauIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_secure_ci_builds_on_user_id_created_at' + + disable_ddl_transaction! + + def up + add_concurrent_index( + :ci_builds, + [:user_id, :created_at], + where: "(((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text])))", + name: INDEX_NAME + ) + end + + def down + remove_concurrent_index_by_name :ci_builds, INDEX_NAME + end +end diff --git a/db/post_migrate/20200623142159_remove_gitlab_issue_tracker_service_records.rb b/db/post_migrate/20200623142159_remove_gitlab_issue_tracker_service_records.rb new file mode 100644 index 00000000000..743499e7b76 --- /dev/null +++ b/db/post_migrate/20200623142159_remove_gitlab_issue_tracker_service_records.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +class RemoveGitlabIssueTrackerServiceRecords < ActiveRecord::Migration[6.0] + DOWNTIME = false + BATCH_SIZE = 5000 + + disable_ddl_transaction! + + class Service < ActiveRecord::Base + include EachBatch + + self.table_name = 'services' + + def self.gitlab_issue_tracker_service + where(type: 'GitlabIssueTrackerService') + end + end + + def up + Service.each_batch(of: BATCH_SIZE) do |services| + services.gitlab_issue_tracker_service.delete_all + end + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20200626060151_add_disable_overriding_approvers_per_merge_request_indices.rb b/db/post_migrate/20200626060151_add_disable_overriding_approvers_per_merge_request_indices.rb new file mode 100644 index 00000000000..6f2db4035e2 --- /dev/null +++ b/db/post_migrate/20200626060151_add_disable_overriding_approvers_per_merge_request_indices.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class AddDisableOverridingApproversPerMergeRequestIndices < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + DISABLE_OVERRIDING_APPROVERS_TRUE_INDEX_NAME = "idx_projects_id_created_at_disable_overriding_approvers_true" + DISABLE_OVERRIDING_APPROVERS_FALSE_INDEX_NAME = "idx_projects_id_created_at_disable_overriding_approvers_false" + + disable_ddl_transaction! + + def up + add_concurrent_index :projects, [:id, :created_at], + where: "disable_overriding_approvers_per_merge_request = TRUE", + name: DISABLE_OVERRIDING_APPROVERS_TRUE_INDEX_NAME + + add_concurrent_index :projects, [:id, :created_at], + where: "(disable_overriding_approvers_per_merge_request = FALSE) OR (disable_overriding_approvers_per_merge_request IS NULL)", + name: DISABLE_OVERRIDING_APPROVERS_FALSE_INDEX_NAME + end + + def down + remove_concurrent_index_by_name :projects, DISABLE_OVERRIDING_APPROVERS_TRUE_INDEX_NAME + remove_concurrent_index_by_name :projects, DISABLE_OVERRIDING_APPROVERS_FALSE_INDEX_NAME + end +end diff --git a/db/post_migrate/20200701070435_add_default_value_stream_to_groups_with_group_stages.rb b/db/post_migrate/20200701070435_add_default_value_stream_to_groups_with_group_stages.rb new file mode 100644 index 00000000000..971eb3c489f --- /dev/null +++ b/db/post_migrate/20200701070435_add_default_value_stream_to_groups_with_group_stages.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +class AddDefaultValueStreamToGroupsWithGroupStages < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + class Group < ActiveRecord::Base + def self.find_sti_class(typename) + if typename == 'Group' + Group + else + super + end + end + self.table_name = 'namespaces' + has_many :group_value_streams + has_many :group_stages + end + + class GroupValueStream < ActiveRecord::Base + self.table_name = 'analytics_cycle_analytics_group_value_streams' + has_many :group_stages + belongs_to :group + end + + class GroupStage < ActiveRecord::Base + self.table_name = 'analytics_cycle_analytics_group_stages' + belongs_to :group_value_stream + end + + def up + Group.where(type: 'Group').joins(:group_stages).distinct.find_each do |group| + Group.transaction do + group_value_stream = group.group_value_streams.first_or_create!(name: 'default') + group.group_stages.update_all(group_value_stream_id: group_value_stream.id) + end + end + + change_column_null :analytics_cycle_analytics_group_stages, :group_value_stream_id, false + end + + def down + change_column_null :analytics_cycle_analytics_group_stages, :group_value_stream_id, true + + GroupValueStream.where(name: 'default').includes(:group_stages).find_each do |value_stream| + GroupValueStream.transaction do + value_stream.group_stages.update_all(group_value_stream_id: nil) + value_stream.destroy! + end + end + end +end diff --git a/db/post_migrate/20200701091253_validate_foreign_key_on_cycle_analytics_group_stages.rb b/db/post_migrate/20200701091253_validate_foreign_key_on_cycle_analytics_group_stages.rb new file mode 100644 index 00000000000..0a8926ed6de --- /dev/null +++ b/db/post_migrate/20200701091253_validate_foreign_key_on_cycle_analytics_group_stages.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class ValidateForeignKeyOnCycleAnalyticsGroupStages < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + # same as in db/migrate/20200701064756_add_not_valid_foreign_key_to_cycle_analytics_group_stages.rb + CONSTRAINT_NAME = 'fk_analytics_cycle_analytics_group_stages_group_value_stream_id' + + def up + validate_foreign_key :analytics_cycle_analytics_group_stages, :group_value_stream_id, name: CONSTRAINT_NAME + end + + def down + remove_foreign_key_if_exists :analytics_cycle_analytics_group_stages, column: :group_value_stream_id, name: CONSTRAINT_NAME + add_foreign_key :analytics_cycle_analytics_group_stages, :analytics_cycle_analytics_group_value_streams, + column: :group_value_stream_id, name: CONSTRAINT_NAME, on_delete: :cascade, validate: false + end +end diff --git a/db/post_migrate/20200703064117_generate_missing_routes_for_bots.rb b/db/post_migrate/20200703064117_generate_missing_routes_for_bots.rb new file mode 100644 index 00000000000..85d62cbb6dd --- /dev/null +++ b/db/post_migrate/20200703064117_generate_missing_routes_for_bots.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +class GenerateMissingRoutesForBots < ActiveRecord::Migration[6.0] + DOWNTIME = false + + disable_ddl_transaction! + + class User < ActiveRecord::Base + self.table_name = 'users' + + USER_TYPES = { + human: nil, + support_bot: 1, + alert_bot: 2, + visual_review_bot: 3, + service_user: 4, + ghost: 5, + project_bot: 6, + migration_bot: 7 + }.with_indifferent_access.freeze + + BOT_USER_TYPES = %w[alert_bot project_bot support_bot visual_review_bot migration_bot].freeze + + scope :bots, -> { where(user_type: USER_TYPES.values_at(*BOT_USER_TYPES)) } + end + + class Route < ActiveRecord::Base + self.table_name = 'routes' + + validates :path, + uniqueness: { case_sensitive: false } + end + + class Namespace < ActiveRecord::Base + self.table_name = 'namespaces' + + belongs_to :owner, class_name: 'GenerateMissingRoutesForBots::User' + + scope :for_user, -> { where('type IS NULL') } + scope :for_bots, -> { for_user.joins(:owner).merge(GenerateMissingRoutesForBots::User.bots) } + + scope :without_routes, -> do + where( + 'NOT EXISTS ( + SELECT 1 + FROM routes + WHERE source_type = ? + AND source_id = namespaces.id + )', + self.source_type_for_route + ) + end + + def self.source_type_for_route + 'Namespace' + end + + def attributes_for_insert + { + source_type: self.class.source_type_for_route, + source_id: id, + name: name, + path: path + } + end + end + + def up + # Reset the column information of all the models that update the database + # to ensure the Active Record's knowledge of the table structure is current + Route.reset_column_information + + logger = Gitlab::BackgroundMigration::Logger.build + attributes_to_be_logged = %w(id path name) + + GenerateMissingRoutesForBots::Namespace.for_bots.without_routes.each do |namespace| + route = GenerateMissingRoutesForBots::Route.create(namespace.attributes_for_insert) + namespace_details = namespace.as_json.slice(*attributes_to_be_logged) + + if route.persisted? + logger.info namespace_details.merge(message: 'a new route was created for the namespace') + else + errors = route.errors.full_messages.join(',') + logger.info namespace_details.merge(message: 'route creation failed for the namespace', errors: errors) + end + end + end + + def down + # no op + end +end diff --git a/db/post_migrate/20200703125016_backfill_namespace_settings.rb b/db/post_migrate/20200703125016_backfill_namespace_settings.rb new file mode 100644 index 00000000000..a7335e2d2b8 --- /dev/null +++ b/db/post_migrate/20200703125016_backfill_namespace_settings.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class BackfillNamespaceSettings < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + MIGRATION = 'BackfillNamespaceSettings' + DELAY_INTERVAL = 2.minutes + BATCH_SIZE = 10_000 + + disable_ddl_transaction! + + class Namespace < ActiveRecord::Base + include EachBatch + + self.table_name = 'namespaces' + end + + def up + say "Scheduling `#{MIGRATION}` jobs" + + queue_background_migration_jobs_by_range_at_intervals(Namespace, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE) + end + + def down + # NOOP + end +end diff --git a/db/post_migrate/20200704143633_add_index_on_user_id_and_created_at_where_source_to_ci_pipelines.rb b/db/post_migrate/20200704143633_add_index_on_user_id_and_created_at_where_source_to_ci_pipelines.rb new file mode 100644 index 00000000000..d84b2b4cad3 --- /dev/null +++ b/db/post_migrate/20200704143633_add_index_on_user_id_and_created_at_where_source_to_ci_pipelines.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexOnUserIdAndCreatedAtWhereSourceToCiPipelines < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_pipelines, [:user_id, :created_at, :config_source] + end + + def down + remove_concurrent_index :ci_pipelines, [:user_id, :created_at, :config_source] + end +end diff --git a/db/post_migrate/20200704161600_add_index_on_id_and_status_and_created_at_to_deployments.rb b/db/post_migrate/20200704161600_add_index_on_id_and_status_and_created_at_to_deployments.rb new file mode 100644 index 00000000000..3aab2fd2949 --- /dev/null +++ b/db/post_migrate/20200704161600_add_index_on_id_and_status_and_created_at_to_deployments.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddIndexOnIdAndStatusAndCreatedAtToDeployments < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :deployments, [:id, :status, :created_at] + remove_concurrent_index :deployments, [:id, :status] + end + + def down + add_concurrent_index :deployments, [:id, :status] + remove_concurrent_index :deployments, [:id, :status, :created_at] + end +end diff --git a/db/post_migrate/20200706154619_drop_ci_daily_report_results_table.rb b/db/post_migrate/20200706154619_drop_ci_daily_report_results_table.rb new file mode 100644 index 00000000000..c6ce52012d6 --- /dev/null +++ b/db/post_migrate/20200706154619_drop_ci_daily_report_results_table.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +class DropCiDailyReportResultsTable < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + drop_table :ci_daily_report_results + end + + def down + create_table :ci_daily_report_results do |t| + t.date :date, null: false + t.bigint :project_id, null: false + t.bigint :last_pipeline_id, null: false + t.float :value, null: false + t.integer :param_type, limit: 8, null: false + t.string :ref_path, null: false + t.string :title, null: false + + t.index :last_pipeline_id + t.index [:project_id, :ref_path, :param_type, :date, :title], name: 'index_daily_report_results_unique_columns', unique: true + end + end +end diff --git a/db/post_migrate/20200709101408_schedule_populate_project_snippet_statistics.rb b/db/post_migrate/20200709101408_schedule_populate_project_snippet_statistics.rb new file mode 100644 index 00000000000..28527e67f4a --- /dev/null +++ b/db/post_migrate/20200709101408_schedule_populate_project_snippet_statistics.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +class SchedulePopulateProjectSnippetStatistics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + DELAY_INTERVAL = 2.minutes.to_i + BATCH_SIZE = 500 + MIGRATION = 'PopulateProjectSnippetStatistics' + + disable_ddl_transaction! + + def up + snippets = exec_query <<~SQL + SELECT snippets.id + FROM snippets + INNER JOIN projects ON projects.id = snippets.project_id + WHERE snippets.type = 'ProjectSnippet' + ORDER BY projects.namespace_id ASC, snippets.project_id ASC, snippets.id ASC + SQL + + snippets.rows.flatten.in_groups_of(BATCH_SIZE, false).each_with_index do |snippet_ids, index| + migrate_in(index * DELAY_INTERVAL, MIGRATION, [snippet_ids]) + end + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20200710102418_delete_user_callout_alerts_moved.rb b/db/post_migrate/20200710102418_delete_user_callout_alerts_moved.rb new file mode 100644 index 00000000000..e14cd7ac3ee --- /dev/null +++ b/db/post_migrate/20200710102418_delete_user_callout_alerts_moved.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +class DeleteUserCalloutAlertsMoved < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + class UserCallout < ActiveRecord::Base + include EachBatch + + self.table_name = 'user_callouts' + end + + BATCH_SIZE = 1_000 + + # Inlined from UserCalloutEnums.feature_names + FEATURE_NAME_ALERTS_MOVED = 20 + + def up + UserCallout.each_batch(of: BATCH_SIZE, column: :user_id) do |callout| + callout.where(feature_name: FEATURE_NAME_ALERTS_MOVED).delete_all + end + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20200710102846_drop_index_ruby_objects_in_details_on_audit_events.rb b/db/post_migrate/20200710102846_drop_index_ruby_objects_in_details_on_audit_events.rb new file mode 100644 index 00000000000..6869938466a --- /dev/null +++ b/db/post_migrate/20200710102846_drop_index_ruby_objects_in_details_on_audit_events.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class DropIndexRubyObjectsInDetailsOnAuditEvents < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_audit_events_on_ruby_object_in_details' + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name(:audit_events, INDEX_NAME) + end + + def down + add_concurrent_index(:audit_events, :id, where: "details ~~ '%ruby/object%'", name: INDEX_NAME) + end +end diff --git a/db/post_migrate/20200713071042_confirm_project_bot_users.rb b/db/post_migrate/20200713071042_confirm_project_bot_users.rb new file mode 100644 index 00000000000..0578fc42ef2 --- /dev/null +++ b/db/post_migrate/20200713071042_confirm_project_bot_users.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +class ConfirmProjectBotUsers < ActiveRecord::Migration[6.0] + DOWNTIME = false + + disable_ddl_transaction! + + class User < ApplicationRecord + self.table_name = 'users' + + include ::EachBatch + + USER_TYPE_PROJECT_BOT = 6 + + scope :project_bots, -> { where(user_type: USER_TYPE_PROJECT_BOT) } + scope :unconfirmed, -> { where(confirmed_at: nil) } + end + + def up + User.reset_column_information + + User.project_bots.unconfirmed.each_batch do |relation| + relation.update_all('confirmed_at = created_at') + end + end + + def down + # no-op + end +end diff --git a/db/structure.sql b/db/structure.sql index fbcbcfc0f16..4cf825da8c9 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1,7 +1,8669 @@ SET search_path=public; +CREATE SCHEMA gitlab_partitions_dynamic; + +COMMENT ON SCHEMA gitlab_partitions_dynamic IS 'Schema to hold partitions managed dynamically from the application, e.g. for time space partitioning.'; + +CREATE SCHEMA gitlab_partitions_static; + +COMMENT ON SCHEMA gitlab_partitions_static IS 'Schema to hold static partitions, e.g. for hash partitioning'; + CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public; +CREATE TABLE public.product_analytics_events_experimental ( + id bigint NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +) +PARTITION BY HASH (project_id); + +CREATE SEQUENCE public.product_analytics_events_experimental_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.product_analytics_events_experimental_id_seq OWNED BY public.product_analytics_events_experimental.id; + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_00 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_00 FOR VALUES WITH (modulus 64, remainder 0); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_01 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_01 FOR VALUES WITH (modulus 64, remainder 1); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_02 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_02 FOR VALUES WITH (modulus 64, remainder 2); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_03 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_03 FOR VALUES WITH (modulus 64, remainder 3); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_04 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_04 FOR VALUES WITH (modulus 64, remainder 4); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_05 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_05 FOR VALUES WITH (modulus 64, remainder 5); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_06 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_06 FOR VALUES WITH (modulus 64, remainder 6); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_07 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_07 FOR VALUES WITH (modulus 64, remainder 7); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_08 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_08 FOR VALUES WITH (modulus 64, remainder 8); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_09 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_09 FOR VALUES WITH (modulus 64, remainder 9); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_10 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_10 FOR VALUES WITH (modulus 64, remainder 10); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_11 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_11 FOR VALUES WITH (modulus 64, remainder 11); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_12 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_12 FOR VALUES WITH (modulus 64, remainder 12); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_13 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_13 FOR VALUES WITH (modulus 64, remainder 13); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_14 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_14 FOR VALUES WITH (modulus 64, remainder 14); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_15 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_15 FOR VALUES WITH (modulus 64, remainder 15); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_16 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_16 FOR VALUES WITH (modulus 64, remainder 16); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_17 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_17 FOR VALUES WITH (modulus 64, remainder 17); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_18 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_18 FOR VALUES WITH (modulus 64, remainder 18); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_19 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_19 FOR VALUES WITH (modulus 64, remainder 19); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_20 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_20 FOR VALUES WITH (modulus 64, remainder 20); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_21 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_21 FOR VALUES WITH (modulus 64, remainder 21); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_22 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_22 FOR VALUES WITH (modulus 64, remainder 22); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_23 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_23 FOR VALUES WITH (modulus 64, remainder 23); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_24 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_24 FOR VALUES WITH (modulus 64, remainder 24); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_25 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_25 FOR VALUES WITH (modulus 64, remainder 25); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_26 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_26 FOR VALUES WITH (modulus 64, remainder 26); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_27 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_27 FOR VALUES WITH (modulus 64, remainder 27); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_28 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_28 FOR VALUES WITH (modulus 64, remainder 28); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_29 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_29 FOR VALUES WITH (modulus 64, remainder 29); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_30 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_30 FOR VALUES WITH (modulus 64, remainder 30); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_31 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_31 FOR VALUES WITH (modulus 64, remainder 31); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_32 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_32 FOR VALUES WITH (modulus 64, remainder 32); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_33 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_33 FOR VALUES WITH (modulus 64, remainder 33); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_34 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_34 FOR VALUES WITH (modulus 64, remainder 34); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_35 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_35 FOR VALUES WITH (modulus 64, remainder 35); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_36 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_36 FOR VALUES WITH (modulus 64, remainder 36); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_37 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_37 FOR VALUES WITH (modulus 64, remainder 37); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_38 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_38 FOR VALUES WITH (modulus 64, remainder 38); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_39 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_39 FOR VALUES WITH (modulus 64, remainder 39); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_40 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_40 FOR VALUES WITH (modulus 64, remainder 40); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_41 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_41 FOR VALUES WITH (modulus 64, remainder 41); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_42 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_42 FOR VALUES WITH (modulus 64, remainder 42); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_43 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_43 FOR VALUES WITH (modulus 64, remainder 43); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_44 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_44 FOR VALUES WITH (modulus 64, remainder 44); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_45 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_45 FOR VALUES WITH (modulus 64, remainder 45); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_46 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_46 FOR VALUES WITH (modulus 64, remainder 46); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_47 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_47 FOR VALUES WITH (modulus 64, remainder 47); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_48 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_48 FOR VALUES WITH (modulus 64, remainder 48); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_49 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_49 FOR VALUES WITH (modulus 64, remainder 49); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_50 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_50 FOR VALUES WITH (modulus 64, remainder 50); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_51 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_51 FOR VALUES WITH (modulus 64, remainder 51); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_52 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_52 FOR VALUES WITH (modulus 64, remainder 52); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_53 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_53 FOR VALUES WITH (modulus 64, remainder 53); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_54 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_54 FOR VALUES WITH (modulus 64, remainder 54); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_55 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_55 FOR VALUES WITH (modulus 64, remainder 55); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_56 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_56 FOR VALUES WITH (modulus 64, remainder 56); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_57 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_57 FOR VALUES WITH (modulus 64, remainder 57); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_58 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_58 FOR VALUES WITH (modulus 64, remainder 58); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_59 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_59 FOR VALUES WITH (modulus 64, remainder 59); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_60 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_60 FOR VALUES WITH (modulus 64, remainder 60); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_61 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_61 FOR VALUES WITH (modulus 64, remainder 61); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_62 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_62 FOR VALUES WITH (modulus 64, remainder 62); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_63 ( + id bigint DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY public.product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63 FOR VALUES WITH (modulus 64, remainder 63); + CREATE TABLE public.abuse_reports ( id integer NOT NULL, reporter_id integer, @@ -74,6 +8736,8 @@ CREATE TABLE public.alert_management_alerts ( monitoring_tool text, hosts text[] DEFAULT '{}'::text[] NOT NULL, payload jsonb DEFAULT '{}'::jsonb NOT NULL, + prometheus_alert_id integer, + environment_id integer, CONSTRAINT check_2df3e2fdc1 CHECK ((char_length(monitoring_tool) <= 100)), CONSTRAINT check_5e9e57cadb CHECK ((char_length(description) <= 1000)), CONSTRAINT check_bac14dddde CHECK ((char_length(service) <= 100)), @@ -136,7 +8800,8 @@ CREATE TABLE public.analytics_cycle_analytics_group_stages ( end_event_label_id bigint, hidden boolean DEFAULT false NOT NULL, custom boolean DEFAULT true NOT NULL, - name character varying(255) NOT NULL + name character varying(255) NOT NULL, + group_value_stream_id bigint NOT NULL ); CREATE SEQUENCE public.analytics_cycle_analytics_group_stages_id_seq @@ -148,6 +8813,24 @@ CREATE SEQUENCE public.analytics_cycle_analytics_group_stages_id_seq ALTER SEQUENCE public.analytics_cycle_analytics_group_stages_id_seq OWNED BY public.analytics_cycle_analytics_group_stages.id; +CREATE TABLE public.analytics_cycle_analytics_group_value_streams ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_bc1ed5f1f7 CHECK ((char_length(name) <= 100)) +); + +CREATE SEQUENCE public.analytics_cycle_analytics_group_value_streams_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.analytics_cycle_analytics_group_value_streams_id_seq OWNED BY public.analytics_cycle_analytics_group_value_streams.id; + CREATE TABLE public.analytics_cycle_analytics_project_stages ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -466,7 +9149,7 @@ CREATE TABLE public.application_settings ( namespace_storage_size_limit bigint DEFAULT 0 NOT NULL, seat_link_enabled boolean DEFAULT true NOT NULL, container_expiration_policies_enable_historic_entries boolean DEFAULT false NOT NULL, - issues_create_limit integer DEFAULT 300 NOT NULL, + issues_create_limit integer DEFAULT 0 NOT NULL, push_rule_id bigint, group_owners_can_manage_default_branch_protection boolean DEFAULT true NOT NULL, container_registry_vendor text DEFAULT ''::text NOT NULL, @@ -478,6 +9161,19 @@ CREATE TABLE public.application_settings ( repository_storages_weighted jsonb DEFAULT '{}'::jsonb NOT NULL, max_import_size integer DEFAULT 50 NOT NULL, enforce_pat_expiration boolean DEFAULT true NOT NULL, + compliance_frameworks smallint[] DEFAULT '{}'::smallint[] NOT NULL, + notify_on_unknown_sign_in boolean DEFAULT true NOT NULL, + default_branch_name text, + project_import_limit integer DEFAULT 6 NOT NULL, + project_export_limit integer DEFAULT 6 NOT NULL, + project_download_export_limit integer DEFAULT 1 NOT NULL, + group_import_limit integer DEFAULT 6 NOT NULL, + group_export_limit integer DEFAULT 6 NOT NULL, + group_download_export_limit integer DEFAULT 1 NOT NULL, + maintenance_mode boolean DEFAULT false NOT NULL, + maintenance_mode_message text, + CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)), + CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)), CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)), CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)), CONSTRAINT check_e5aba18f02 CHECK ((char_length(container_registry_version) <= 255)) @@ -698,7 +9394,11 @@ CREATE TABLE public.audit_events ( details text, created_at timestamp without time zone, updated_at timestamp without time zone, - ip_address inet + ip_address inet, + author_name text, + entity_path text, + CONSTRAINT check_492aaa021d CHECK ((char_length(entity_path) <= 5500)), + CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)) ); CREATE SEQUENCE public.audit_events_id_seq @@ -737,6 +9437,42 @@ CREATE TABLE public.aws_roles ( role_external_id character varying(64) NOT NULL ); +CREATE TABLE public.background_migration_jobs ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL, + class_name text NOT NULL, + arguments jsonb NOT NULL, + CONSTRAINT check_b0de0a5852 CHECK ((char_length(class_name) <= 200)) +); + +CREATE SEQUENCE public.background_migration_jobs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.background_migration_jobs_id_seq OWNED BY public.background_migration_jobs.id; + +CREATE TABLE public.backup_labels ( + id integer NOT NULL, + title character varying, + color character varying, + project_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + template boolean DEFAULT false, + description character varying, + description_html text, + type character varying, + group_id integer, + cached_markdown_version integer, + restore_action integer, + new_title character varying +); + CREATE TABLE public.badges ( id integer NOT NULL, link_url character varying NOT NULL, @@ -1051,7 +9787,8 @@ CREATE TABLE public.ci_builds ( resource_group_id bigint, waiting_for_resource_at timestamp with time zone, processed boolean, - scheduling_type smallint + scheduling_type smallint, + CONSTRAINT check_1e2fbd1b39 CHECK ((lock_version IS NOT NULL)) ); CREATE SEQUENCE public.ci_builds_id_seq @@ -1074,7 +9811,8 @@ CREATE TABLE public.ci_builds_metadata ( config_variables jsonb, has_exposed_artifacts boolean, environment_auto_stop_in character varying(255), - expanded_environment_name character varying(255) + expanded_environment_name character varying(255), + secrets jsonb DEFAULT '{}'::jsonb NOT NULL ); CREATE SEQUENCE public.ci_builds_metadata_id_seq @@ -1122,26 +9860,6 @@ CREATE SEQUENCE public.ci_daily_build_group_report_results_id_seq ALTER SEQUENCE public.ci_daily_build_group_report_results_id_seq OWNED BY public.ci_daily_build_group_report_results.id; -CREATE TABLE public.ci_daily_report_results ( - id bigint NOT NULL, - date date NOT NULL, - project_id bigint NOT NULL, - last_pipeline_id bigint NOT NULL, - value double precision NOT NULL, - param_type bigint NOT NULL, - ref_path character varying NOT NULL, - title character varying NOT NULL -); - -CREATE SEQUENCE public.ci_daily_report_results_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE public.ci_daily_report_results_id_seq OWNED BY public.ci_daily_report_results.id; - CREATE TABLE public.ci_freeze_periods ( id bigint NOT NULL, project_id bigint NOT NULL, @@ -1221,7 +9939,8 @@ CREATE TABLE public.ci_job_artifacts ( file_sha256 bytea, file_format smallint, file_location smallint, - locked boolean + locked boolean, + CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL)) ); CREATE SEQUENCE public.ci_job_artifacts_id_seq @@ -1268,6 +9987,23 @@ CREATE SEQUENCE public.ci_pipeline_chat_data_id_seq ALTER SEQUENCE public.ci_pipeline_chat_data_id_seq OWNED BY public.ci_pipeline_chat_data.id; +CREATE TABLE public.ci_pipeline_messages ( + id bigint NOT NULL, + severity smallint DEFAULT 0 NOT NULL, + pipeline_id integer NOT NULL, + content text NOT NULL, + CONSTRAINT check_58ca2981b2 CHECK ((char_length(content) <= 10000)) +); + +CREATE SEQUENCE public.ci_pipeline_messages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.ci_pipeline_messages_id_seq OWNED BY public.ci_pipeline_messages.id; + CREATE TABLE public.ci_pipeline_schedule_variables ( id integer NOT NULL, key character varying NOT NULL, @@ -1361,7 +10097,9 @@ CREATE TABLE public.ci_pipelines ( source_sha bytea, target_sha bytea, external_pull_request_id bigint, - ci_ref_id bigint + ci_ref_id bigint, + locked smallint DEFAULT 0 NOT NULL, + CONSTRAINT check_d7e99a025e CHECK ((lock_version IS NOT NULL)) ); CREATE TABLE public.ci_pipelines_config ( @@ -1546,7 +10284,8 @@ CREATE TABLE public.ci_stages ( name character varying, status integer, lock_version integer DEFAULT 0, - "position" integer + "position" integer, + CONSTRAINT check_81b431e49b CHECK ((lock_version IS NOT NULL)) ); CREATE SEQUENCE public.ci_stages_id_seq @@ -1789,6 +10528,24 @@ CREATE SEQUENCE public.clusters_applications_cert_managers_id_seq ALTER SEQUENCE public.clusters_applications_cert_managers_id_seq OWNED BY public.clusters_applications_cert_managers.id; +CREATE TABLE public.clusters_applications_cilium ( + id bigint NOT NULL, + cluster_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status integer NOT NULL, + status_reason text +); + +CREATE SEQUENCE public.clusters_applications_cilium_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.clusters_applications_cilium_id_seq OWNED BY public.clusters_applications_cilium.id; + CREATE TABLE public.clusters_applications_crossplane ( id integer NOT NULL, created_at timestamp with time zone NOT NULL, @@ -2113,6 +10870,63 @@ CREATE SEQUENCE public.conversational_development_index_metrics_id_seq ALTER SEQUENCE public.conversational_development_index_metrics_id_seq OWNED BY public.conversational_development_index_metrics.id; +CREATE TABLE public.custom_emoji ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + file text NOT NULL, + CONSTRAINT check_8c586dd507 CHECK ((char_length(name) <= 36)), + CONSTRAINT check_dd5d60f1fb CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE public.custom_emoji_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.custom_emoji_id_seq OWNED BY public.custom_emoji.id; + +CREATE TABLE public.dast_site_profiles ( + id bigint NOT NULL, + project_id bigint NOT NULL, + dast_site_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + CONSTRAINT check_6cfab17b48 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE public.dast_site_profiles_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.dast_site_profiles_id_seq OWNED BY public.dast_site_profiles.id; + +CREATE TABLE public.dast_sites ( + id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + url text NOT NULL, + CONSTRAINT check_46df8b449c CHECK ((char_length(url) <= 255)) +); + +CREATE SEQUENCE public.dast_sites_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.dast_sites_id_seq OWNED BY public.dast_sites.id; + CREATE TABLE public.dependency_proxy_blobs ( id integer NOT NULL, group_id integer NOT NULL, @@ -2368,6 +11182,33 @@ CREATE SEQUENCE public.draft_notes_id_seq ALTER SEQUENCE public.draft_notes_id_seq OWNED BY public.draft_notes.id; +CREATE TABLE public.elastic_reindexing_tasks ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + documents_count integer, + state smallint DEFAULT 0 NOT NULL, + in_progress boolean DEFAULT true NOT NULL, + index_name_from text, + index_name_to text, + elastic_task text, + error_message text, + documents_count_target integer, + CONSTRAINT check_04151aca42 CHECK ((char_length(index_name_from) <= 255)), + CONSTRAINT check_7f64acda8e CHECK ((char_length(error_message) <= 255)), + CONSTRAINT check_85ebff7124 CHECK ((char_length(index_name_to) <= 255)), + CONSTRAINT check_942e5aae53 CHECK ((char_length(elastic_task) <= 255)) +); + +CREATE SEQUENCE public.elastic_reindexing_tasks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.elastic_reindexing_tasks_id_seq OWNED BY public.elastic_reindexing_tasks.id; + CREATE TABLE public.elasticsearch_indexed_namespaces ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, @@ -2505,7 +11346,8 @@ CREATE TABLE public.epics ( start_date_sourcing_epic_id integer, due_date_sourcing_epic_id integer, confidential boolean DEFAULT false NOT NULL, - external_key character varying(255) + external_key character varying(255), + CONSTRAINT check_fcfb4a93ff CHECK ((lock_version IS NOT NULL)) ); CREATE SEQUENCE public.epics_id_seq @@ -3199,6 +12041,23 @@ CREATE TABLE public.group_deploy_keys ( CONSTRAINT check_f58fa0a0f7 CHECK ((char_length(key) <= 4096)) ); +CREATE TABLE public.group_deploy_keys_groups ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + group_deploy_key_id bigint NOT NULL +); + +CREATE SEQUENCE public.group_deploy_keys_groups_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.group_deploy_keys_groups_id_seq OWNED BY public.group_deploy_keys_groups.id; + CREATE SEQUENCE public.group_deploy_keys_id_seq START WITH 1 INCREMENT BY 1 @@ -3531,7 +12390,8 @@ CREATE TABLE public.issues ( promoted_to_epic_id integer, health_status smallint, external_key character varying(255), - sprint_id bigint + sprint_id bigint, + CONSTRAINT check_fba63f706d CHECK ((lock_version IS NOT NULL)) ); CREATE SEQUENCE public.issues_id_seq @@ -3634,7 +12494,10 @@ CREATE TABLE public.jira_tracker_data ( encrypted_username_iv character varying, encrypted_password character varying, encrypted_password_iv character varying, - jira_issue_transition_id character varying + jira_issue_transition_id character varying, + project_key text, + issues_enabled boolean DEFAULT false NOT NULL, + CONSTRAINT check_214cf6a48b CHECK ((char_length(project_key) <= 255)) ); CREATE SEQUENCE public.jira_tracker_data_id_seq @@ -3774,7 +12637,8 @@ CREATE TABLE public.lfs_objects ( created_at timestamp without time zone, updated_at timestamp without time zone, file character varying, - file_store integer DEFAULT 1 + file_store integer DEFAULT 1, + CONSTRAINT check_eecfc5717d CHECK ((file_store IS NOT NULL)) ); CREATE SEQUENCE public.lfs_objects_id_seq @@ -4110,7 +12974,8 @@ CREATE TABLE public.merge_requests ( state_id smallint DEFAULT 1 NOT NULL, rebase_jid character varying, squash_commit_sha bytea, - sprint_id bigint + sprint_id bigint, + CONSTRAINT check_970d272570 CHECK ((lock_version IS NOT NULL)) ); CREATE TABLE public.merge_requests_closing_issues ( @@ -4236,6 +13101,13 @@ CREATE TABLE public.namespace_aggregation_schedules ( namespace_id integer NOT NULL ); +CREATE TABLE public.namespace_limits ( + additional_purchased_storage_size bigint DEFAULT 0 NOT NULL, + additional_purchased_storage_ends_on date, + namespace_id integer NOT NULL, + temporary_storage_increase_ends_on date +); + CREATE TABLE public.namespace_root_storage_statistics ( namespace_id integer NOT NULL, updated_at timestamp with time zone NOT NULL, @@ -4244,7 +13116,14 @@ CREATE TABLE public.namespace_root_storage_statistics ( wiki_size bigint DEFAULT 0 NOT NULL, build_artifacts_size bigint DEFAULT 0 NOT NULL, storage_size bigint DEFAULT 0 NOT NULL, - packages_size bigint DEFAULT 0 NOT NULL + packages_size bigint DEFAULT 0 NOT NULL, + snippets_size bigint DEFAULT 0 NOT NULL +); + +CREATE TABLE public.namespace_settings ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + namespace_id integer NOT NULL ); CREATE TABLE public.namespace_statistics ( @@ -4308,7 +13187,11 @@ CREATE TABLE public.namespaces ( default_branch_protection smallint, unlock_membership_to_ldap boolean, max_personal_access_token_lifetime integer, - push_rule_id bigint + push_rule_id bigint, + shared_runners_enabled boolean DEFAULT true NOT NULL, + allow_descendants_override_disabled_shared_runners boolean DEFAULT false NOT NULL, + traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL, + delayed_project_removal boolean DEFAULT false NOT NULL ); CREATE SEQUENCE public.namespaces_id_seq @@ -4957,7 +13840,8 @@ CREATE TABLE public.personal_access_tokens ( '::character varying NOT NULL, impersonation boolean DEFAULT false NOT NULL, token_digest character varying, - expire_notification_delivered boolean DEFAULT false NOT NULL + expire_notification_delivered boolean DEFAULT false NOT NULL, + last_used_at timestamp with time zone ); CREATE SEQUENCE public.personal_access_tokens_id_seq @@ -4980,7 +13864,34 @@ CREATE TABLE public.plan_limits ( ci_project_subscriptions integer DEFAULT 2 NOT NULL, ci_pipeline_schedules integer DEFAULT 10 NOT NULL, offset_pagination_limit integer DEFAULT 50000 NOT NULL, - ci_instance_level_variables integer DEFAULT 25 NOT NULL + ci_instance_level_variables integer DEFAULT 25 NOT NULL, + storage_size_limit integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_lsif integer DEFAULT 20 NOT NULL, + ci_max_artifact_size_archive integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metadata integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_trace integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_junit integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_sast integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_dependency_scanning integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_container_scanning integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_dast integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_codequality integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_license_management integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_license_scanning integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_performance integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metrics integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metrics_referee integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_network_referee integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_dotenv integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_cobertura integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_terraform integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_accessibility integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_cluster_applications integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_secret_detection integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_requirements integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_coverage_fuzzing integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_browser_performance integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_load_performance integer DEFAULT 0 NOT NULL ); CREATE SEQUENCE public.plan_limits_id_seq @@ -5276,7 +14187,12 @@ CREATE TABLE public.project_incident_management_settings ( project_id integer NOT NULL, create_issue boolean DEFAULT false NOT NULL, send_email boolean DEFAULT false NOT NULL, - issue_template_key text + issue_template_key text, + pagerduty_active boolean DEFAULT false NOT NULL, + encrypted_pagerduty_token bytea, + encrypted_pagerduty_token_iv bytea, + CONSTRAINT pagerduty_token_iv_length_constraint CHECK ((octet_length(encrypted_pagerduty_token_iv) <= 12)), + CONSTRAINT pagerduty_token_length_constraint CHECK ((octet_length(encrypted_pagerduty_token) <= 255)) ); CREATE SEQUENCE public.project_incident_management_settings_project_id_seq @@ -5410,6 +14326,8 @@ CREATE TABLE public.project_settings ( push_rule_id bigint, show_default_award_emojis boolean DEFAULT true, allow_merge_on_skipped_pipeline boolean, + squash_option smallint DEFAULT 3, + has_confluence boolean DEFAULT false NOT NULL, CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL)) ); @@ -5425,7 +14343,8 @@ CREATE TABLE public.project_statistics ( shared_runners_seconds bigint DEFAULT 0 NOT NULL, shared_runners_seconds_last_reset timestamp without time zone, packages_size bigint DEFAULT 0 NOT NULL, - wiki_size bigint + wiki_size bigint, + snippets_size bigint ); CREATE SEQUENCE public.project_statistics_id_seq @@ -5637,7 +14556,8 @@ CREATE TABLE public.protected_branch_push_access_levels ( created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, user_id integer, - group_id integer + group_id integer, + deploy_key_id integer ); CREATE SEQUENCE public.protected_branch_push_access_levels_id_seq @@ -5989,6 +14909,11 @@ CREATE TABLE public.resource_state_events ( created_at timestamp with time zone NOT NULL, state smallint NOT NULL, epic_id integer, + source_commit text, + close_after_error_tracking_resolve boolean DEFAULT false NOT NULL, + close_auto_resolve_prometheus_alert boolean DEFAULT false NOT NULL, + source_merge_request_id bigint, + CONSTRAINT check_f0bcfaa3a2 CHECK ((char_length(source_commit) <= 40)), CONSTRAINT state_events_must_belong_to_issue_or_merge_request_or_epic CHECK ((((issue_id <> NULL::bigint) AND (merge_request_id IS NULL) AND (epic_id IS NULL)) OR ((issue_id IS NULL) AND (merge_request_id <> NULL::bigint) AND (epic_id IS NULL)) OR ((issue_id IS NULL) AND (merge_request_id IS NULL) AND (epic_id <> NULL::integer)))) ); @@ -6307,6 +15232,13 @@ CREATE TABLE public.snippet_repositories ( disk_path character varying(80) NOT NULL ); +CREATE TABLE public.snippet_statistics ( + snippet_id bigint NOT NULL, + repository_size bigint DEFAULT 0 NOT NULL, + file_count bigint DEFAULT 0 NOT NULL, + commit_count bigint DEFAULT 0 NOT NULL +); + CREATE TABLE public.snippet_user_mentions ( id bigint NOT NULL, snippet_id integer NOT NULL, @@ -6708,7 +15640,8 @@ CREATE TABLE public.uploads ( created_at timestamp without time zone NOT NULL, store integer DEFAULT 1, mount_point character varying, - secret character varying + secret character varying, + CONSTRAINT check_5e9547379c CHECK ((store IS NOT NULL)) ); CREATE SEQUENCE public.uploads_id_seq @@ -6794,7 +15727,11 @@ ALTER SEQUENCE public.user_custom_attributes_id_seq OWNED BY public.user_custom_ CREATE TABLE public.user_details ( user_id bigint NOT NULL, job_title character varying(200) DEFAULT ''::character varying NOT NULL, - bio character varying(255) DEFAULT ''::character varying NOT NULL + bio character varying(255) DEFAULT ''::character varying NOT NULL, + bio_html text, + cached_markdown_version integer, + webauthn_xid text, + CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)) ); CREATE SEQUENCE public.user_details_user_id_seq @@ -6841,7 +15778,8 @@ CREATE TABLE public.user_preferences ( render_whitespace_in_code boolean, tab_width smallint, feature_filter_type bigint, - experience_level smallint + experience_level smallint, + view_diffs_file_by_file boolean DEFAULT false NOT NULL ); CREATE SEQUENCE public.user_preferences_id_seq @@ -7245,7 +16183,8 @@ CREATE TABLE public.vulnerability_scanners ( updated_at timestamp with time zone NOT NULL, project_id integer NOT NULL, external_id character varying NOT NULL, - name character varying NOT NULL + name character varying NOT NULL, + vendor text DEFAULT 'GitLab'::text NOT NULL ); CREATE SEQUENCE public.vulnerability_scanners_id_seq @@ -7257,6 +16196,30 @@ CREATE SEQUENCE public.vulnerability_scanners_id_seq ALTER SEQUENCE public.vulnerability_scanners_id_seq OWNED BY public.vulnerability_scanners.id; +CREATE TABLE public.vulnerability_statistics ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + total integer DEFAULT 0 NOT NULL, + critical integer DEFAULT 0 NOT NULL, + high integer DEFAULT 0 NOT NULL, + medium integer DEFAULT 0 NOT NULL, + low integer DEFAULT 0 NOT NULL, + unknown integer DEFAULT 0 NOT NULL, + info integer DEFAULT 0 NOT NULL, + letter_grade smallint NOT NULL +); + +CREATE SEQUENCE public.vulnerability_statistics_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.vulnerability_statistics_id_seq OWNED BY public.vulnerability_statistics.id; + CREATE TABLE public.vulnerability_user_mentions ( id bigint NOT NULL, vulnerability_id bigint NOT NULL, @@ -7336,6 +16299,28 @@ CREATE SEQUENCE public.web_hooks_id_seq ALTER SEQUENCE public.web_hooks_id_seq OWNED BY public.web_hooks.id; +CREATE TABLE public.webauthn_registrations ( + id bigint NOT NULL, + user_id bigint NOT NULL, + counter bigint DEFAULT 0 NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + credential_xid text NOT NULL, + name text NOT NULL, + public_key text NOT NULL, + CONSTRAINT check_242f0cc65c CHECK ((char_length(credential_xid) <= 255)), + CONSTRAINT check_2f02e74321 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE public.webauthn_registrations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE public.webauthn_registrations_id_seq OWNED BY public.webauthn_registrations.id; + CREATE TABLE public.wiki_page_meta ( id integer NOT NULL, project_id bigint NOT NULL, @@ -7462,6 +16447,8 @@ ALTER TABLE ONLY public.allowed_email_domains ALTER COLUMN id SET DEFAULT nextva ALTER TABLE ONLY public.analytics_cycle_analytics_group_stages ALTER COLUMN id SET DEFAULT nextval('public.analytics_cycle_analytics_group_stages_id_seq'::regclass); +ALTER TABLE ONLY public.analytics_cycle_analytics_group_value_streams ALTER COLUMN id SET DEFAULT nextval('public.analytics_cycle_analytics_group_value_streams_id_seq'::regclass); + ALTER TABLE ONLY public.analytics_cycle_analytics_project_stages ALTER COLUMN id SET DEFAULT nextval('public.analytics_cycle_analytics_project_stages_id_seq'::regclass); ALTER TABLE ONLY public.appearances ALTER COLUMN id SET DEFAULT nextval('public.appearances_id_seq'::regclass); @@ -7496,6 +16483,8 @@ ALTER TABLE ONLY public.audit_events ALTER COLUMN id SET DEFAULT nextval('public ALTER TABLE ONLY public.award_emoji ALTER COLUMN id SET DEFAULT nextval('public.award_emoji_id_seq'::regclass); +ALTER TABLE ONLY public.background_migration_jobs ALTER COLUMN id SET DEFAULT nextval('public.background_migration_jobs_id_seq'::regclass); + ALTER TABLE ONLY public.badges ALTER COLUMN id SET DEFAULT nextval('public.badges_id_seq'::regclass); ALTER TABLE ONLY public.board_assignees ALTER COLUMN id SET DEFAULT nextval('public.board_assignees_id_seq'::regclass); @@ -7532,8 +16521,6 @@ ALTER TABLE ONLY public.ci_builds_runner_session ALTER COLUMN id SET DEFAULT nex ALTER TABLE ONLY public.ci_daily_build_group_report_results ALTER COLUMN id SET DEFAULT nextval('public.ci_daily_build_group_report_results_id_seq'::regclass); -ALTER TABLE ONLY public.ci_daily_report_results ALTER COLUMN id SET DEFAULT nextval('public.ci_daily_report_results_id_seq'::regclass); - ALTER TABLE ONLY public.ci_freeze_periods ALTER COLUMN id SET DEFAULT nextval('public.ci_freeze_periods_id_seq'::regclass); ALTER TABLE ONLY public.ci_group_variables ALTER COLUMN id SET DEFAULT nextval('public.ci_group_variables_id_seq'::regclass); @@ -7546,6 +16533,8 @@ ALTER TABLE ONLY public.ci_job_variables ALTER COLUMN id SET DEFAULT nextval('pu ALTER TABLE ONLY public.ci_pipeline_chat_data ALTER COLUMN id SET DEFAULT nextval('public.ci_pipeline_chat_data_id_seq'::regclass); +ALTER TABLE ONLY public.ci_pipeline_messages ALTER COLUMN id SET DEFAULT nextval('public.ci_pipeline_messages_id_seq'::regclass); + ALTER TABLE ONLY public.ci_pipeline_schedule_variables ALTER COLUMN id SET DEFAULT nextval('public.ci_pipeline_schedule_variables_id_seq'::regclass); ALTER TABLE ONLY public.ci_pipeline_schedules ALTER COLUMN id SET DEFAULT nextval('public.ci_pipeline_schedules_id_seq'::regclass); @@ -7596,6 +16585,8 @@ ALTER TABLE ONLY public.clusters ALTER COLUMN id SET DEFAULT nextval('public.clu ALTER TABLE ONLY public.clusters_applications_cert_managers ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_cert_managers_id_seq'::regclass); +ALTER TABLE ONLY public.clusters_applications_cilium ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_cilium_id_seq'::regclass); + ALTER TABLE ONLY public.clusters_applications_crossplane ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_crossplane_id_seq'::regclass); ALTER TABLE ONLY public.clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_elastic_stacks_id_seq'::regclass); @@ -7622,6 +16613,12 @@ ALTER TABLE ONLY public.container_repositories ALTER COLUMN id SET DEFAULT nextv ALTER TABLE ONLY public.conversational_development_index_metrics ALTER COLUMN id SET DEFAULT nextval('public.conversational_development_index_metrics_id_seq'::regclass); +ALTER TABLE ONLY public.custom_emoji ALTER COLUMN id SET DEFAULT nextval('public.custom_emoji_id_seq'::regclass); + +ALTER TABLE ONLY public.dast_site_profiles ALTER COLUMN id SET DEFAULT nextval('public.dast_site_profiles_id_seq'::regclass); + +ALTER TABLE ONLY public.dast_sites ALTER COLUMN id SET DEFAULT nextval('public.dast_sites_id_seq'::regclass); + ALTER TABLE ONLY public.dependency_proxy_blobs ALTER COLUMN id SET DEFAULT nextval('public.dependency_proxy_blobs_id_seq'::regclass); ALTER TABLE ONLY public.dependency_proxy_group_settings ALTER COLUMN id SET DEFAULT nextval('public.dependency_proxy_group_settings_id_seq'::regclass); @@ -7646,6 +16643,8 @@ ALTER TABLE ONLY public.diff_note_positions ALTER COLUMN id SET DEFAULT nextval( ALTER TABLE ONLY public.draft_notes ALTER COLUMN id SET DEFAULT nextval('public.draft_notes_id_seq'::regclass); +ALTER TABLE ONLY public.elastic_reindexing_tasks ALTER COLUMN id SET DEFAULT nextval('public.elastic_reindexing_tasks_id_seq'::regclass); + ALTER TABLE ONLY public.emails ALTER COLUMN id SET DEFAULT nextval('public.emails_id_seq'::regclass); ALTER TABLE ONLY public.environments ALTER COLUMN id SET DEFAULT nextval('public.environments_id_seq'::regclass); @@ -7724,6 +16723,8 @@ ALTER TABLE ONLY public.group_custom_attributes ALTER COLUMN id SET DEFAULT next ALTER TABLE ONLY public.group_deploy_keys ALTER COLUMN id SET DEFAULT nextval('public.group_deploy_keys_id_seq'::regclass); +ALTER TABLE ONLY public.group_deploy_keys_groups ALTER COLUMN id SET DEFAULT nextval('public.group_deploy_keys_groups_id_seq'::regclass); + ALTER TABLE ONLY public.group_deploy_tokens ALTER COLUMN id SET DEFAULT nextval('public.group_deploy_tokens_id_seq'::regclass); ALTER TABLE ONLY public.group_group_links ALTER COLUMN id SET DEFAULT nextval('public.group_group_links_id_seq'::regclass); @@ -7882,6 +16883,8 @@ ALTER TABLE ONLY public.plans ALTER COLUMN id SET DEFAULT nextval('public.plans_ ALTER TABLE ONLY public.pool_repositories ALTER COLUMN id SET DEFAULT nextval('public.pool_repositories_id_seq'::regclass); +ALTER TABLE ONLY public.product_analytics_events_experimental ALTER COLUMN id SET DEFAULT nextval('public.product_analytics_events_experimental_id_seq'::regclass); + ALTER TABLE ONLY public.programming_languages ALTER COLUMN id SET DEFAULT nextval('public.programming_languages_id_seq'::regclass); ALTER TABLE ONLY public.project_aliases ALTER COLUMN id SET DEFAULT nextval('public.project_aliases_id_seq'::regclass); @@ -8076,12 +17079,16 @@ ALTER TABLE ONLY public.vulnerability_occurrences ALTER COLUMN id SET DEFAULT ne ALTER TABLE ONLY public.vulnerability_scanners ALTER COLUMN id SET DEFAULT nextval('public.vulnerability_scanners_id_seq'::regclass); +ALTER TABLE ONLY public.vulnerability_statistics ALTER COLUMN id SET DEFAULT nextval('public.vulnerability_statistics_id_seq'::regclass); + ALTER TABLE ONLY public.vulnerability_user_mentions ALTER COLUMN id SET DEFAULT nextval('public.vulnerability_user_mentions_id_seq'::regclass); ALTER TABLE ONLY public.web_hook_logs ALTER COLUMN id SET DEFAULT nextval('public.web_hook_logs_id_seq'::regclass); ALTER TABLE ONLY public.web_hooks ALTER COLUMN id SET DEFAULT nextval('public.web_hooks_id_seq'::regclass); +ALTER TABLE ONLY public.webauthn_registrations ALTER COLUMN id SET DEFAULT nextval('public.webauthn_registrations_id_seq'::regclass); + ALTER TABLE ONLY public.wiki_page_meta ALTER COLUMN id SET DEFAULT nextval('public.wiki_page_meta_id_seq'::regclass); ALTER TABLE ONLY public.wiki_page_slugs ALTER COLUMN id SET DEFAULT nextval('public.wiki_page_slugs_id_seq'::regclass); @@ -8094,6 +17101,201 @@ ALTER TABLE ONLY public.x509_issuers ALTER COLUMN id SET DEFAULT nextval('public ALTER TABLE ONLY public.zoom_meetings ALTER COLUMN id SET DEFAULT nextval('public.zoom_meetings_id_seq'::regclass); +ALTER TABLE ONLY public.product_analytics_events_experimental + ADD CONSTRAINT product_analytics_events_experimental_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_00 + ADD CONSTRAINT product_analytics_events_experimental_00_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_01 + ADD CONSTRAINT product_analytics_events_experimental_01_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_02 + ADD CONSTRAINT product_analytics_events_experimental_02_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_03 + ADD CONSTRAINT product_analytics_events_experimental_03_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_04 + ADD CONSTRAINT product_analytics_events_experimental_04_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_05 + ADD CONSTRAINT product_analytics_events_experimental_05_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_06 + ADD CONSTRAINT product_analytics_events_experimental_06_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_07 + ADD CONSTRAINT product_analytics_events_experimental_07_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_08 + ADD CONSTRAINT product_analytics_events_experimental_08_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_09 + ADD CONSTRAINT product_analytics_events_experimental_09_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_10 + ADD CONSTRAINT product_analytics_events_experimental_10_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_11 + ADD CONSTRAINT product_analytics_events_experimental_11_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_12 + ADD CONSTRAINT product_analytics_events_experimental_12_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_13 + ADD CONSTRAINT product_analytics_events_experimental_13_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_14 + ADD CONSTRAINT product_analytics_events_experimental_14_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_15 + ADD CONSTRAINT product_analytics_events_experimental_15_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_16 + ADD CONSTRAINT product_analytics_events_experimental_16_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_17 + ADD CONSTRAINT product_analytics_events_experimental_17_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_18 + ADD CONSTRAINT product_analytics_events_experimental_18_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_19 + ADD CONSTRAINT product_analytics_events_experimental_19_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_20 + ADD CONSTRAINT product_analytics_events_experimental_20_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_21 + ADD CONSTRAINT product_analytics_events_experimental_21_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_22 + ADD CONSTRAINT product_analytics_events_experimental_22_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_23 + ADD CONSTRAINT product_analytics_events_experimental_23_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_24 + ADD CONSTRAINT product_analytics_events_experimental_24_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_25 + ADD CONSTRAINT product_analytics_events_experimental_25_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_26 + ADD CONSTRAINT product_analytics_events_experimental_26_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_27 + ADD CONSTRAINT product_analytics_events_experimental_27_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_28 + ADD CONSTRAINT product_analytics_events_experimental_28_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_29 + ADD CONSTRAINT product_analytics_events_experimental_29_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_30 + ADD CONSTRAINT product_analytics_events_experimental_30_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_31 + ADD CONSTRAINT product_analytics_events_experimental_31_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_32 + ADD CONSTRAINT product_analytics_events_experimental_32_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_33 + ADD CONSTRAINT product_analytics_events_experimental_33_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_34 + ADD CONSTRAINT product_analytics_events_experimental_34_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_35 + ADD CONSTRAINT product_analytics_events_experimental_35_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_36 + ADD CONSTRAINT product_analytics_events_experimental_36_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_37 + ADD CONSTRAINT product_analytics_events_experimental_37_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_38 + ADD CONSTRAINT product_analytics_events_experimental_38_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_39 + ADD CONSTRAINT product_analytics_events_experimental_39_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_40 + ADD CONSTRAINT product_analytics_events_experimental_40_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_41 + ADD CONSTRAINT product_analytics_events_experimental_41_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_42 + ADD CONSTRAINT product_analytics_events_experimental_42_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_43 + ADD CONSTRAINT product_analytics_events_experimental_43_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_44 + ADD CONSTRAINT product_analytics_events_experimental_44_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_45 + ADD CONSTRAINT product_analytics_events_experimental_45_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_46 + ADD CONSTRAINT product_analytics_events_experimental_46_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_47 + ADD CONSTRAINT product_analytics_events_experimental_47_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_48 + ADD CONSTRAINT product_analytics_events_experimental_48_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_49 + ADD CONSTRAINT product_analytics_events_experimental_49_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_50 + ADD CONSTRAINT product_analytics_events_experimental_50_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_51 + ADD CONSTRAINT product_analytics_events_experimental_51_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_52 + ADD CONSTRAINT product_analytics_events_experimental_52_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_53 + ADD CONSTRAINT product_analytics_events_experimental_53_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_54 + ADD CONSTRAINT product_analytics_events_experimental_54_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_55 + ADD CONSTRAINT product_analytics_events_experimental_55_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_56 + ADD CONSTRAINT product_analytics_events_experimental_56_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_57 + ADD CONSTRAINT product_analytics_events_experimental_57_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_58 + ADD CONSTRAINT product_analytics_events_experimental_58_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_59 + ADD CONSTRAINT product_analytics_events_experimental_59_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_60 + ADD CONSTRAINT product_analytics_events_experimental_60_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_61 + ADD CONSTRAINT product_analytics_events_experimental_61_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_62 + ADD CONSTRAINT product_analytics_events_experimental_62_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_63 + ADD CONSTRAINT product_analytics_events_experimental_63_pkey PRIMARY KEY (id, project_id); + ALTER TABLE ONLY public.abuse_reports ADD CONSTRAINT abuse_reports_pkey PRIMARY KEY (id); @@ -8115,6 +17317,9 @@ ALTER TABLE ONLY public.allowed_email_domains ALTER TABLE ONLY public.analytics_cycle_analytics_group_stages ADD CONSTRAINT analytics_cycle_analytics_group_stages_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.analytics_cycle_analytics_group_value_streams + ADD CONSTRAINT analytics_cycle_analytics_group_value_streams_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.analytics_cycle_analytics_project_stages ADD CONSTRAINT analytics_cycle_analytics_project_stages_pkey PRIMARY KEY (id); @@ -8172,6 +17377,12 @@ ALTER TABLE ONLY public.award_emoji ALTER TABLE ONLY public.aws_roles ADD CONSTRAINT aws_roles_pkey PRIMARY KEY (user_id); +ALTER TABLE ONLY public.background_migration_jobs + ADD CONSTRAINT background_migration_jobs_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY public.backup_labels + ADD CONSTRAINT backup_labels_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.badges ADD CONSTRAINT badges_pkey PRIMARY KEY (id); @@ -8205,14 +17416,8 @@ ALTER TABLE ONLY public.chat_teams ALTER TABLE public.design_management_designs ADD CONSTRAINT check_07155e2715 CHECK ((char_length((filename)::text) <= 255)) NOT VALID; -ALTER TABLE public.ci_job_artifacts - ADD CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL)) NOT VALID; - -ALTER TABLE public.uploads - ADD CONSTRAINT check_5e9547379c CHECK ((store IS NOT NULL)) NOT VALID; - -ALTER TABLE public.lfs_objects - ADD CONSTRAINT check_eecfc5717d CHECK ((file_store IS NOT NULL)) NOT VALID; +ALTER TABLE public.vulnerability_scanners + ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID; ALTER TABLE ONLY public.ci_build_needs ADD CONSTRAINT ci_build_needs_pkey PRIMARY KEY (id); @@ -8238,9 +17443,6 @@ ALTER TABLE ONLY public.ci_builds_runner_session ALTER TABLE ONLY public.ci_daily_build_group_report_results ADD CONSTRAINT ci_daily_build_group_report_results_pkey PRIMARY KEY (id); -ALTER TABLE ONLY public.ci_daily_report_results - ADD CONSTRAINT ci_daily_report_results_pkey PRIMARY KEY (id); - ALTER TABLE ONLY public.ci_freeze_periods ADD CONSTRAINT ci_freeze_periods_pkey PRIMARY KEY (id); @@ -8259,6 +17461,9 @@ ALTER TABLE ONLY public.ci_job_variables ALTER TABLE ONLY public.ci_pipeline_chat_data ADD CONSTRAINT ci_pipeline_chat_data_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.ci_pipeline_messages + ADD CONSTRAINT ci_pipeline_messages_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.ci_pipeline_schedule_variables ADD CONSTRAINT ci_pipeline_schedule_variables_pkey PRIMARY KEY (id); @@ -8331,6 +17536,9 @@ ALTER TABLE ONLY public.cluster_providers_gcp ALTER TABLE ONLY public.clusters_applications_cert_managers ADD CONSTRAINT clusters_applications_cert_managers_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.clusters_applications_cilium + ADD CONSTRAINT clusters_applications_cilium_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.clusters_applications_crossplane ADD CONSTRAINT clusters_applications_crossplane_pkey PRIMARY KEY (id); @@ -8376,6 +17584,15 @@ ALTER TABLE ONLY public.container_repositories ALTER TABLE ONLY public.conversational_development_index_metrics ADD CONSTRAINT conversational_development_index_metrics_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.custom_emoji + ADD CONSTRAINT custom_emoji_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY public.dast_site_profiles + ADD CONSTRAINT dast_site_profiles_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY public.dast_sites + ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.dependency_proxy_blobs ADD CONSTRAINT dependency_proxy_blobs_pkey PRIMARY KEY (id); @@ -8415,6 +17632,9 @@ ALTER TABLE ONLY public.diff_note_positions ALTER TABLE ONLY public.draft_notes ADD CONSTRAINT draft_notes_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.elastic_reindexing_tasks + ADD CONSTRAINT elastic_reindexing_tasks_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.emails ADD CONSTRAINT emails_pkey PRIMARY KEY (id); @@ -8532,6 +17752,9 @@ ALTER TABLE ONLY public.group_custom_attributes ALTER TABLE ONLY public.group_deletion_schedules ADD CONSTRAINT group_deletion_schedules_pkey PRIMARY KEY (group_id); +ALTER TABLE ONLY public.group_deploy_keys_groups + ADD CONSTRAINT group_deploy_keys_groups_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.group_deploy_keys ADD CONSTRAINT group_deploy_keys_pkey PRIMARY KEY (id); @@ -8673,9 +17896,15 @@ ALTER TABLE ONLY public.milestones ALTER TABLE ONLY public.namespace_aggregation_schedules ADD CONSTRAINT namespace_aggregation_schedules_pkey PRIMARY KEY (namespace_id); +ALTER TABLE ONLY public.namespace_limits + ADD CONSTRAINT namespace_limits_pkey PRIMARY KEY (namespace_id); + ALTER TABLE ONLY public.namespace_root_storage_statistics ADD CONSTRAINT namespace_root_storage_statistics_pkey PRIMARY KEY (namespace_id); +ALTER TABLE ONLY public.namespace_settings + ADD CONSTRAINT namespace_settings_pkey PRIMARY KEY (namespace_id); + ALTER TABLE ONLY public.namespace_statistics ADD CONSTRAINT namespace_statistics_pkey PRIMARY KEY (id); @@ -8991,6 +18220,9 @@ ALTER TABLE ONLY public.smartcard_identities ALTER TABLE ONLY public.snippet_repositories ADD CONSTRAINT snippet_repositories_pkey PRIMARY KEY (snippet_id); +ALTER TABLE ONLY public.snippet_statistics + ADD CONSTRAINT snippet_statistics_pkey PRIMARY KEY (snippet_id); + ALTER TABLE ONLY public.snippet_user_mentions ADD CONSTRAINT snippet_user_mentions_pkey PRIMARY KEY (id); @@ -9117,6 +18349,9 @@ ALTER TABLE ONLY public.vulnerability_occurrences ALTER TABLE ONLY public.vulnerability_scanners ADD CONSTRAINT vulnerability_scanners_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.vulnerability_statistics + ADD CONSTRAINT vulnerability_statistics_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.vulnerability_user_mentions ADD CONSTRAINT vulnerability_user_mentions_pkey PRIMARY KEY (id); @@ -9126,6 +18361,9 @@ ALTER TABLE ONLY public.web_hook_logs ALTER TABLE ONLY public.web_hooks ADD CONSTRAINT web_hooks_pkey PRIMARY KEY (id); +ALTER TABLE ONLY public.webauthn_registrations + ADD CONSTRAINT webauthn_registrations_pkey PRIMARY KEY (id); + ALTER TABLE ONLY public.wiki_page_meta ADD CONSTRAINT wiki_page_meta_pkey PRIMARY KEY (id); @@ -9144,6 +18382,136 @@ ALTER TABLE ONLY public.x509_issuers ALTER TABLE ONLY public.zoom_meetings ADD CONSTRAINT zoom_meetings_pkey PRIMARY KEY (id); +CREATE INDEX index_product_analytics_events_experimental_project_and_time ON ONLY public.product_analytics_events_experimental USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx10 ON gitlab_partitions_static.product_analytics_events_experimental_10 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx11 ON gitlab_partitions_static.product_analytics_events_experimental_11 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx12 ON gitlab_partitions_static.product_analytics_events_experimental_12 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx13 ON gitlab_partitions_static.product_analytics_events_experimental_13 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx14 ON gitlab_partitions_static.product_analytics_events_experimental_14 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx15 ON gitlab_partitions_static.product_analytics_events_experimental_15 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx16 ON gitlab_partitions_static.product_analytics_events_experimental_16 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx17 ON gitlab_partitions_static.product_analytics_events_experimental_17 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx18 ON gitlab_partitions_static.product_analytics_events_experimental_18 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx19 ON gitlab_partitions_static.product_analytics_events_experimental_19 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx20 ON gitlab_partitions_static.product_analytics_events_experimental_20 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx21 ON gitlab_partitions_static.product_analytics_events_experimental_21 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx22 ON gitlab_partitions_static.product_analytics_events_experimental_22 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx23 ON gitlab_partitions_static.product_analytics_events_experimental_23 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx24 ON gitlab_partitions_static.product_analytics_events_experimental_24 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx25 ON gitlab_partitions_static.product_analytics_events_experimental_25 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx26 ON gitlab_partitions_static.product_analytics_events_experimental_26 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx27 ON gitlab_partitions_static.product_analytics_events_experimental_27 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx28 ON gitlab_partitions_static.product_analytics_events_experimental_28 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx29 ON gitlab_partitions_static.product_analytics_events_experimental_29 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx30 ON gitlab_partitions_static.product_analytics_events_experimental_30 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx31 ON gitlab_partitions_static.product_analytics_events_experimental_31 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx32 ON gitlab_partitions_static.product_analytics_events_experimental_32 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx33 ON gitlab_partitions_static.product_analytics_events_experimental_33 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx34 ON gitlab_partitions_static.product_analytics_events_experimental_34 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx35 ON gitlab_partitions_static.product_analytics_events_experimental_35 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx36 ON gitlab_partitions_static.product_analytics_events_experimental_36 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx37 ON gitlab_partitions_static.product_analytics_events_experimental_37 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx38 ON gitlab_partitions_static.product_analytics_events_experimental_38 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx39 ON gitlab_partitions_static.product_analytics_events_experimental_39 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx40 ON gitlab_partitions_static.product_analytics_events_experimental_40 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx41 ON gitlab_partitions_static.product_analytics_events_experimental_41 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx42 ON gitlab_partitions_static.product_analytics_events_experimental_42 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx43 ON gitlab_partitions_static.product_analytics_events_experimental_43 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx44 ON gitlab_partitions_static.product_analytics_events_experimental_44 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx45 ON gitlab_partitions_static.product_analytics_events_experimental_45 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx46 ON gitlab_partitions_static.product_analytics_events_experimental_46 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx47 ON gitlab_partitions_static.product_analytics_events_experimental_47 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx48 ON gitlab_partitions_static.product_analytics_events_experimental_48 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx49 ON gitlab_partitions_static.product_analytics_events_experimental_49 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx50 ON gitlab_partitions_static.product_analytics_events_experimental_50 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx51 ON gitlab_partitions_static.product_analytics_events_experimental_51 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx52 ON gitlab_partitions_static.product_analytics_events_experimental_52 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx53 ON gitlab_partitions_static.product_analytics_events_experimental_53 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx54 ON gitlab_partitions_static.product_analytics_events_experimental_54 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx55 ON gitlab_partitions_static.product_analytics_events_experimental_55 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx56 ON gitlab_partitions_static.product_analytics_events_experimental_56 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx57 ON gitlab_partitions_static.product_analytics_events_experimental_57 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx58 ON gitlab_partitions_static.product_analytics_events_experimental_58 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx59 ON gitlab_partitions_static.product_analytics_events_experimental_59 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx60 ON gitlab_partitions_static.product_analytics_events_experimental_60 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx61 ON gitlab_partitions_static.product_analytics_events_experimental_61 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx62 ON gitlab_partitions_static.product_analytics_events_experimental_62 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx63 ON gitlab_partitions_static.product_analytics_events_experimental_63 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx1 ON gitlab_partitions_static.product_analytics_events_experimental_01 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx2 ON gitlab_partitions_static.product_analytics_events_experimental_02 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx3 ON gitlab_partitions_static.product_analytics_events_experimental_03 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx4 ON gitlab_partitions_static.product_analytics_events_experimental_04 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx5 ON gitlab_partitions_static.product_analytics_events_experimental_05 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx6 ON gitlab_partitions_static.product_analytics_events_experimental_06 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx7 ON gitlab_partitions_static.product_analytics_events_experimental_07 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx8 ON gitlab_partitions_static.product_analytics_events_experimental_08 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx9 ON gitlab_partitions_static.product_analytics_events_experimental_09 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_experi_project_id_collector_tstamp_idx ON gitlab_partitions_static.product_analytics_events_experimental_00 USING btree (project_id, collector_tstamp); + CREATE INDEX analytics_index_audit_events_on_created_at_and_author_id ON public.audit_events USING btree (created_at, author_id); CREATE INDEX analytics_index_events_on_created_at_and_author_id ON public.events USING btree (created_at, author_id); @@ -9156,7 +18524,21 @@ CREATE UNIQUE INDEX any_approver_merge_request_rule_type_unique_index ON public. CREATE UNIQUE INDEX any_approver_project_rule_type_unique_index ON public.approval_project_rules USING btree (project_id) WHERE (rule_type = 3); -CREATE UNIQUE INDEX approval_rule_name_index_for_code_owners ON public.approval_merge_request_rules USING btree (merge_request_id, code_owner, name) WHERE (code_owner = true); +CREATE UNIQUE INDEX approval_rule_name_index_for_code_owners ON public.approval_merge_request_rules USING btree (merge_request_id, code_owner, name) WHERE ((code_owner = true) AND (section IS NULL)); + +CREATE UNIQUE INDEX backup_labels_group_id_project_id_title_idx ON public.backup_labels USING btree (group_id, project_id, title); + +CREATE INDEX backup_labels_group_id_title_idx ON public.backup_labels USING btree (group_id, title) WHERE (project_id = NULL::integer); + +CREATE INDEX backup_labels_project_id_idx ON public.backup_labels USING btree (project_id); + +CREATE UNIQUE INDEX backup_labels_project_id_title_idx ON public.backup_labels USING btree (project_id, title) WHERE (group_id = NULL::integer); + +CREATE INDEX backup_labels_template_idx ON public.backup_labels USING btree (template) WHERE template; + +CREATE INDEX backup_labels_title_idx ON public.backup_labels USING btree (title); + +CREATE INDEX backup_labels_type_project_id_idx ON public.backup_labels USING btree (type, project_id); CREATE INDEX ci_builds_gitlab_monitor_metrics ON public.ci_builds USING btree (status, created_at, project_id) WHERE ((type)::text = 'Ci::Build'::text); @@ -9172,6 +18554,8 @@ CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_and_note_id_index ON public.ep CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON public.epic_user_mentions USING btree (epic_id) WHERE (note_id IS NULL); +CREATE INDEX idx_ci_pipelines_artifacts_locked ON public.ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1); + CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON public.deployment_clusters USING btree (cluster_id, kubernetes_namespace); CREATE UNIQUE INDEX idx_deployment_merge_requests_unique_index ON public.deployment_merge_requests USING btree (deployment_id, merge_request_id); @@ -9222,6 +18606,10 @@ CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_eve CREATE INDEX idx_project_repository_check_partial ON public.projects USING btree (repository_storage, created_at) WHERE (last_repository_check_at IS NULL); +CREATE INDEX idx_projects_id_created_at_disable_overriding_approvers_false ON public.projects USING btree (id, created_at) WHERE ((disable_overriding_approvers_per_merge_request = false) OR (disable_overriding_approvers_per_merge_request IS NULL)); + +CREATE INDEX idx_projects_id_created_at_disable_overriding_approvers_true ON public.projects USING btree (id, created_at) WHERE (disable_overriding_approvers_per_merge_request = true); + CREATE INDEX idx_projects_on_repository_storage_last_repository_updated_at ON public.projects USING btree (id, repository_storage, last_repository_updated_at); CREATE INDEX idx_repository_states_on_last_repository_verification_ran_at ON public.project_repository_states USING btree (project_id, last_repository_verification_ran_at) WHERE ((repository_verification_checksum IS NOT NULL) AND (last_repository_verification_failure IS NULL)); @@ -9250,12 +18638,14 @@ CREATE INDEX index_alert_assignees_on_alert_id ON public.alert_management_alert_ CREATE UNIQUE INDEX index_alert_assignees_on_user_id_and_alert_id ON public.alert_management_alert_assignees USING btree (user_id, alert_id); -CREATE INDEX index_alert_management_alerts_on_issue_id ON public.alert_management_alerts USING btree (issue_id); +CREATE INDEX index_alert_management_alerts_on_environment_id ON public.alert_management_alerts USING btree (environment_id) WHERE (environment_id IS NOT NULL); -CREATE UNIQUE INDEX index_alert_management_alerts_on_project_id_and_fingerprint ON public.alert_management_alerts USING btree (project_id, fingerprint); +CREATE INDEX index_alert_management_alerts_on_issue_id ON public.alert_management_alerts USING btree (issue_id); CREATE UNIQUE INDEX index_alert_management_alerts_on_project_id_and_iid ON public.alert_management_alerts USING btree (project_id, iid); +CREATE INDEX index_alert_management_alerts_on_prometheus_alert_id ON public.alert_management_alerts USING btree (prometheus_alert_id) WHERE (prometheus_alert_id IS NOT NULL); + CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id ON public.alert_management_alert_user_mentions USING btree (alert_management_alert_id) WHERE (note_id IS NULL); CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id_and_note_id ON public.alert_management_alert_user_mentions USING btree (alert_management_alert_id, note_id); @@ -9276,6 +18666,10 @@ CREATE INDEX index_analytics_ca_group_stages_on_relative_position ON public.anal CREATE INDEX index_analytics_ca_group_stages_on_start_event_label_id ON public.analytics_cycle_analytics_group_stages USING btree (start_event_label_id); +CREATE INDEX index_analytics_ca_group_stages_on_value_stream_id ON public.analytics_cycle_analytics_group_stages USING btree (group_value_stream_id); + +CREATE UNIQUE INDEX index_analytics_ca_group_value_streams_on_group_id_and_name ON public.analytics_cycle_analytics_group_value_streams USING btree (group_id, name); + CREATE INDEX index_analytics_ca_project_stages_on_end_event_label_id ON public.analytics_cycle_analytics_project_stages USING btree (end_event_label_id); CREATE INDEX index_analytics_ca_project_stages_on_project_id ON public.analytics_cycle_analytics_project_stages USING btree (project_id); @@ -9334,7 +18728,9 @@ CREATE UNIQUE INDEX index_approval_project_rules_users_1 ON public.approval_proj CREATE INDEX index_approval_project_rules_users_2 ON public.approval_project_rules_users USING btree (user_id); -CREATE UNIQUE INDEX index_approval_rule_name_for_code_owners_rule_type ON public.approval_merge_request_rules USING btree (merge_request_id, name) WHERE (rule_type = 2); +CREATE UNIQUE INDEX index_approval_rule_name_for_code_owners_rule_type ON public.approval_merge_request_rules USING btree (merge_request_id, name) WHERE ((rule_type = 2) AND (section IS NULL)); + +CREATE UNIQUE INDEX index_approval_rule_name_for_sectional_code_owners_rule_type ON public.approval_merge_request_rules USING btree (merge_request_id, name, section) WHERE (rule_type = 2); CREATE INDEX index_approval_rules_code_owners_rule_type ON public.approval_merge_request_rules USING btree (merge_request_id) WHERE (rule_type = 2); @@ -9350,9 +18746,7 @@ CREATE INDEX index_approvers_on_target_id_and_target_type ON public.approvers US CREATE INDEX index_approvers_on_user_id ON public.approvers USING btree (user_id); -CREATE INDEX index_audit_events_on_entity_id_and_entity_type_and_id_desc ON public.audit_events USING btree (entity_id, entity_type, id DESC); - -CREATE INDEX index_audit_events_on_ruby_object_in_details ON public.audit_events USING btree (id) WHERE (details ~~ '%ruby/object%'::text); +CREATE INDEX index_audit_events_on_entity_id_entity_type_id_desc_author_id ON public.audit_events USING btree (entity_id, entity_type, id DESC, author_id); CREATE INDEX index_award_emoji_on_awardable_type_and_awardable_id ON public.award_emoji USING btree (awardable_type, awardable_id); @@ -9362,6 +18756,12 @@ CREATE UNIQUE INDEX index_aws_roles_on_role_external_id ON public.aws_roles USIN CREATE UNIQUE INDEX index_aws_roles_on_user_id ON public.aws_roles USING btree (user_id); +CREATE INDEX index_background_migration_jobs_for_partitioning_migrations ON public.background_migration_jobs USING btree (((arguments ->> 2))) WHERE (class_name = 'Gitlab::Database::PartitioningMigrationHelpers::BackfillPartitionedTable'::text); + +CREATE INDEX index_background_migration_jobs_on_class_name_and_arguments ON public.background_migration_jobs USING btree (class_name, arguments); + +CREATE INDEX index_background_migration_jobs_on_class_name_and_status_and_id ON public.background_migration_jobs USING btree (class_name, status, id); + CREATE INDEX index_badges_on_group_id ON public.badges USING btree (group_id); CREATE INDEX index_badges_on_project_id ON public.badges USING btree (project_id); @@ -9482,16 +18882,12 @@ CREATE UNIQUE INDEX index_ci_builds_runner_session_on_build_id ON public.ci_buil CREATE INDEX index_ci_daily_build_group_report_results_on_last_pipeline_id ON public.ci_daily_build_group_report_results USING btree (last_pipeline_id); -CREATE INDEX index_ci_daily_report_results_on_last_pipeline_id ON public.ci_daily_report_results USING btree (last_pipeline_id); - CREATE INDEX index_ci_freeze_periods_on_project_id ON public.ci_freeze_periods USING btree (project_id); CREATE UNIQUE INDEX index_ci_group_variables_on_group_id_and_key ON public.ci_group_variables USING btree (group_id, key); CREATE UNIQUE INDEX index_ci_instance_variables_on_key ON public.ci_instance_variables USING btree (key); -CREATE INDEX index_ci_job_artifacts_file_store_is_null ON public.ci_job_artifacts USING btree (id) WHERE (file_store IS NULL); - CREATE INDEX index_ci_job_artifacts_for_terraform_reports ON public.ci_job_artifacts USING btree (project_id, id) WHERE (file_type = 18); CREATE INDEX index_ci_job_artifacts_on_expire_at_and_job_id ON public.ci_job_artifacts USING btree (expire_at, job_id); @@ -9512,6 +18908,8 @@ CREATE INDEX index_ci_pipeline_chat_data_on_chat_name_id ON public.ci_pipeline_c CREATE UNIQUE INDEX index_ci_pipeline_chat_data_on_pipeline_id ON public.ci_pipeline_chat_data USING btree (pipeline_id); +CREATE INDEX index_ci_pipeline_messages_on_pipeline_id ON public.ci_pipeline_messages USING btree (pipeline_id); + CREATE UNIQUE INDEX index_ci_pipeline_schedule_variables_on_schedule_id_and_key ON public.ci_pipeline_schedule_variables USING btree (pipeline_schedule_id, key); CREATE INDEX index_ci_pipeline_schedules_on_next_run_at_and_active ON public.ci_pipeline_schedules USING btree (next_run_at, active); @@ -9554,6 +18952,8 @@ CREATE INDEX index_ci_pipelines_on_project_idandrefandiddesc ON public.ci_pipeli CREATE INDEX index_ci_pipelines_on_status ON public.ci_pipelines USING btree (status); +CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_config_source ON public.ci_pipelines USING btree (user_id, created_at, config_source); + CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_source ON public.ci_pipelines USING btree (user_id, created_at, source); CREATE UNIQUE INDEX index_ci_refs_on_project_id_and_ref_path ON public.ci_refs USING btree (project_id, ref_path); @@ -9642,6 +19042,8 @@ CREATE UNIQUE INDEX index_cluster_providers_gcp_on_cluster_id ON public.cluster_ CREATE UNIQUE INDEX index_clusters_applications_cert_managers_on_cluster_id ON public.clusters_applications_cert_managers USING btree (cluster_id); +CREATE UNIQUE INDEX index_clusters_applications_cilium_on_cluster_id ON public.clusters_applications_cilium USING btree (cluster_id); + CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON public.clusters_applications_crossplane USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON public.clusters_applications_elastic_stacks USING btree (cluster_id); @@ -9692,14 +19094,22 @@ CREATE UNIQUE INDEX index_container_repositories_on_project_id_and_name ON publi CREATE INDEX index_container_repository_on_name_trigram ON public.container_repositories USING gin (name public.gin_trgm_ops); +CREATE UNIQUE INDEX index_custom_emoji_on_namespace_id_and_name ON public.custom_emoji USING btree (namespace_id, name); + CREATE UNIQUE INDEX index_daily_build_group_report_results_unique_columns ON public.ci_daily_build_group_report_results USING btree (project_id, ref_path, date, group_name); -CREATE UNIQUE INDEX index_daily_report_results_unique_columns ON public.ci_daily_report_results USING btree (project_id, ref_path, param_type, date, title); +CREATE INDEX index_dast_site_profiles_on_dast_site_id ON public.dast_site_profiles USING btree (dast_site_id); + +CREATE UNIQUE INDEX index_dast_site_profiles_on_project_id_and_name ON public.dast_site_profiles USING btree (project_id, name); + +CREATE UNIQUE INDEX index_dast_sites_on_project_id_and_url ON public.dast_sites USING btree (project_id, url); CREATE INDEX index_dependency_proxy_blobs_on_group_id_and_file_name ON public.dependency_proxy_blobs USING btree (group_id, file_name); CREATE INDEX index_dependency_proxy_group_settings_on_group_id ON public.dependency_proxy_group_settings USING btree (group_id); +CREATE INDEX index_deploy_key_id_on_protected_branch_push_access_levels ON public.protected_branch_push_access_levels USING btree (deploy_key_id); + CREATE INDEX index_deploy_keys_projects_on_deploy_key_id ON public.deploy_keys_projects USING btree (deploy_key_id); CREATE INDEX index_deploy_keys_projects_on_project_id ON public.deploy_keys_projects USING btree (project_id); @@ -9726,7 +19136,7 @@ CREATE INDEX index_deployments_on_environment_id_and_iid_and_project_id ON publi CREATE INDEX index_deployments_on_environment_id_and_status ON public.deployments USING btree (environment_id, status); -CREATE INDEX index_deployments_on_id_and_status ON public.deployments USING btree (id, status); +CREATE INDEX index_deployments_on_id_and_status_and_created_at ON public.deployments USING btree (id, status, created_at); CREATE INDEX index_deployments_on_id_where_cluster_id_present ON public.deployments USING btree (id) WHERE (cluster_id IS NOT NULL); @@ -9776,6 +19186,10 @@ CREATE INDEX index_draft_notes_on_discussion_id ON public.draft_notes USING btre CREATE INDEX index_draft_notes_on_merge_request_id ON public.draft_notes USING btree (merge_request_id); +CREATE UNIQUE INDEX index_elastic_reindexing_tasks_on_in_progress ON public.elastic_reindexing_tasks USING btree (in_progress) WHERE in_progress; + +CREATE INDEX index_elastic_reindexing_tasks_on_state ON public.elastic_reindexing_tasks USING btree (state); + CREATE INDEX index_elasticsearch_indexed_namespaces_on_created_at ON public.elasticsearch_indexed_namespaces USING btree (created_at); CREATE UNIQUE INDEX index_elasticsearch_indexed_namespaces_on_namespace_id ON public.elasticsearch_indexed_namespaces USING btree (namespace_id); @@ -9834,8 +19248,6 @@ CREATE INDEX index_epics_on_iid ON public.epics USING btree (iid); CREATE INDEX index_epics_on_last_edited_by_id ON public.epics USING btree (last_edited_by_id); -CREATE INDEX index_epics_on_lock_version ON public.epics USING btree (lock_version) WHERE (lock_version IS NULL); - CREATE INDEX index_epics_on_parent_id ON public.epics USING btree (parent_id); CREATE INDEX index_epics_on_start_date ON public.epics USING btree (start_date); @@ -9992,6 +19404,10 @@ CREATE INDEX index_group_deletion_schedules_on_marked_for_deletion_on ON public. CREATE INDEX index_group_deletion_schedules_on_user_id ON public.group_deletion_schedules USING btree (user_id); +CREATE UNIQUE INDEX index_group_deploy_keys_group_on_group_deploy_key_and_group_ids ON public.group_deploy_keys_groups USING btree (group_id, group_deploy_key_id); + +CREATE INDEX index_group_deploy_keys_groups_on_group_deploy_key_id ON public.group_deploy_keys_groups USING btree (group_deploy_key_id); + CREATE UNIQUE INDEX index_group_deploy_keys_on_fingerprint ON public.group_deploy_keys USING btree (fingerprint); CREATE INDEX index_group_deploy_keys_on_fingerprint_sha256 ON public.group_deploy_keys USING btree (fingerprint_sha256); @@ -10078,8 +19494,6 @@ CREATE INDEX index_issues_on_duplicated_to_id ON public.issues USING btree (dupl CREATE INDEX index_issues_on_last_edited_by_id ON public.issues USING btree (last_edited_by_id); -CREATE INDEX index_issues_on_lock_version ON public.issues USING btree (lock_version) WHERE (lock_version IS NULL); - CREATE INDEX index_issues_on_milestone_id ON public.issues USING btree (milestone_id); CREATE INDEX index_issues_on_moved_to_id ON public.issues USING btree (moved_to_id) WHERE (moved_to_id IS NOT NULL); @@ -10140,7 +19554,7 @@ CREATE INDEX index_labels_on_group_id_and_title ON public.labels USING btree (gr CREATE INDEX index_labels_on_project_id ON public.labels USING btree (project_id); -CREATE INDEX index_labels_on_project_id_and_title ON public.labels USING btree (project_id, title) WHERE (group_id = NULL::integer); +CREATE UNIQUE INDEX index_labels_on_project_id_and_title_unique ON public.labels USING btree (project_id, title) WHERE (group_id IS NULL); CREATE INDEX index_labels_on_template ON public.labels USING btree (template) WHERE template; @@ -10152,8 +19566,6 @@ CREATE UNIQUE INDEX index_lfs_file_locks_on_project_id_and_path ON public.lfs_fi CREATE INDEX index_lfs_file_locks_on_user_id ON public.lfs_file_locks USING btree (user_id); -CREATE INDEX index_lfs_objects_file_store_is_null ON public.lfs_objects USING btree (id) WHERE (file_store IS NULL); - CREATE INDEX index_lfs_objects_on_file_store ON public.lfs_objects USING btree (file_store); CREATE UNIQUE INDEX index_lfs_objects_on_oid ON public.lfs_objects USING btree (oid); @@ -10212,8 +19624,6 @@ CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id ON public.merg CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id_partial ON public.merge_request_diffs USING btree (merge_request_id, id) WHERE ((NOT stored_externally) OR (stored_externally IS NULL)); -CREATE INDEX index_merge_request_metrics ON public.merge_request_metrics USING btree (merge_request_id); - CREATE INDEX index_merge_request_metrics_on_first_deployed_to_production_at ON public.merge_request_metrics USING btree (first_deployed_to_production_at); CREATE INDEX index_merge_request_metrics_on_latest_closed_at ON public.merge_request_metrics USING btree (latest_closed_at) WHERE (latest_closed_at IS NOT NULL); @@ -10246,8 +19656,6 @@ CREATE INDEX index_merge_requests_on_head_pipeline_id ON public.merge_requests U CREATE INDEX index_merge_requests_on_latest_merge_request_diff_id ON public.merge_requests USING btree (latest_merge_request_diff_id); -CREATE INDEX index_merge_requests_on_lock_version ON public.merge_requests USING btree (lock_version) WHERE (lock_version IS NULL); - CREATE INDEX index_merge_requests_on_merge_user_id ON public.merge_requests USING btree (merge_user_id) WHERE (merge_user_id IS NOT NULL); CREATE INDEX index_merge_requests_on_milestone_id ON public.merge_requests USING btree (milestone_id); @@ -10488,6 +19896,8 @@ CREATE INDEX index_pages_domains_on_verified_at_and_enabled_until ON public.page CREATE INDEX index_pages_domains_on_wildcard ON public.pages_domains USING btree (wildcard); +CREATE UNIQUE INDEX index_partial_am_alerts_on_project_id_and_fingerprint ON public.alert_management_alerts USING btree (project_id, fingerprint) WHERE (status <> 2); + CREATE UNIQUE INDEX index_partitioned_foreign_keys_unique_index ON public.partitioned_foreign_keys USING btree (to_table, from_table, from_column); CREATE INDEX index_pat_on_user_id_and_expires_at ON public.personal_access_tokens USING btree (user_id, expires_at); @@ -10590,6 +20000,12 @@ CREATE INDEX index_project_statistics_on_namespace_id ON public.project_statisti CREATE UNIQUE INDEX index_project_statistics_on_project_id ON public.project_statistics USING btree (project_id); +CREATE INDEX index_project_statistics_on_repository_size_and_project_id ON public.project_statistics USING btree (repository_size, project_id); + +CREATE INDEX index_project_statistics_on_storage_size_and_project_id ON public.project_statistics USING btree (storage_size, project_id); + +CREATE INDEX index_project_statistics_on_wiki_size_and_project_id ON public.project_statistics USING btree (wiki_size, project_id); + CREATE UNIQUE INDEX index_project_tracing_settings_on_project_id ON public.project_tracing_settings USING btree (project_id); CREATE INDEX index_projects_api_created_at_id_desc ON public.projects USING btree (created_at, id DESC); @@ -10692,7 +20108,9 @@ CREATE INDEX index_prometheus_metrics_on_common ON public.prometheus_metrics USI CREATE INDEX index_prometheus_metrics_on_group ON public.prometheus_metrics USING btree ("group"); -CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier ON public.prometheus_metrics USING btree (identifier); +CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_null_project ON public.prometheus_metrics USING btree (identifier) WHERE (project_id IS NULL); + +CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_project_id ON public.prometheus_metrics USING btree (identifier, project_id); CREATE INDEX index_prometheus_metrics_on_project_id ON public.prometheus_metrics USING btree (project_id); @@ -10810,6 +20228,8 @@ CREATE INDEX index_resource_state_events_on_issue_id_and_created_at ON public.re CREATE INDEX index_resource_state_events_on_merge_request_id ON public.resource_state_events USING btree (merge_request_id); +CREATE INDEX index_resource_state_events_on_source_merge_request_id ON public.resource_state_events USING btree (source_merge_request_id); + CREATE INDEX index_resource_state_events_on_user_id ON public.resource_state_events USING btree (user_id); CREATE INDEX index_resource_weight_events_on_issue_id_and_created_at ON public.resource_weight_events USING btree (issue_id, created_at); @@ -10842,6 +20262,8 @@ CREATE UNIQUE INDEX index_scim_identities_on_user_id_and_group_id ON public.scim CREATE UNIQUE INDEX index_scim_oauth_access_tokens_on_group_id_and_token_encrypted ON public.scim_oauth_access_tokens USING btree (group_id, token_encrypted); +CREATE INDEX index_secure_ci_builds_on_user_id_created_at ON public.ci_builds USING btree (user_id, created_at) WHERE (((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text]))); + CREATE INDEX index_security_ci_builds_on_name_and_id ON public.ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)); CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON public.self_managed_prometheus_alert_events USING btree (environment_id); @@ -10900,6 +20322,8 @@ CREATE INDEX index_snippets_on_description_trigram ON public.snippets USING gin CREATE INDEX index_snippets_on_file_name_trigram ON public.snippets USING gin (file_name public.gin_trgm_ops); +CREATE INDEX index_snippets_on_id_and_created_at ON public.snippets USING btree (id, created_at); + CREATE INDEX index_snippets_on_id_and_type ON public.snippets USING btree (id, type); CREATE INDEX index_snippets_on_project_id_and_visibility_level ON public.snippets USING btree (project_id, visibility_level); @@ -11012,8 +20436,6 @@ CREATE INDEX index_uploads_on_store ON public.uploads USING btree (store); CREATE INDEX index_uploads_on_uploader_and_path ON public.uploads USING btree (uploader, path); -CREATE INDEX index_uploads_store_is_null ON public.uploads USING btree (id) WHERE (store IS NULL); - CREATE INDEX index_user_agent_details_on_subject_id_and_subject_type ON public.user_agent_details USING btree (subject_id, subject_type); CREATE INDEX index_user_callouts_on_user_id ON public.user_callouts USING btree (user_id); @@ -11158,6 +20580,10 @@ CREATE INDEX index_vulnerability_occurrences_on_vulnerability_id ON public.vulne CREATE UNIQUE INDEX index_vulnerability_scanners_on_project_id_and_external_id ON public.vulnerability_scanners USING btree (project_id, external_id); +CREATE INDEX index_vulnerability_statistics_on_letter_grade ON public.vulnerability_statistics USING btree (letter_grade); + +CREATE UNIQUE INDEX index_vulnerability_statistics_on_unique_project_id ON public.vulnerability_statistics USING btree (project_id); + CREATE UNIQUE INDEX index_vulnerability_user_mentions_on_note_id ON public.vulnerability_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id ON public.vulnerability_user_mentions USING btree (vulnerability_id) WHERE (note_id IS NULL); @@ -11174,6 +20600,10 @@ CREATE INDEX index_web_hooks_on_project_id ON public.web_hooks USING btree (proj CREATE INDEX index_web_hooks_on_type ON public.web_hooks USING btree (type); +CREATE UNIQUE INDEX index_webauthn_registrations_on_credential_xid ON public.webauthn_registrations USING btree (credential_xid); + +CREATE INDEX index_webauthn_registrations_on_user_id ON public.webauthn_registrations USING btree (user_id); + CREATE INDEX index_wiki_page_meta_on_project_id ON public.wiki_page_meta USING btree (project_id); CREATE UNIQUE INDEX index_wiki_page_slugs_on_slug_and_wiki_page_meta_id ON public.wiki_page_slugs USING btree (slug, wiki_page_meta_id); @@ -11248,11 +20678,9 @@ CREATE INDEX tmp_build_stage_position_index ON public.ci_builds USING btree (sta CREATE INDEX tmp_idx_on_user_id_where_bio_is_filled ON public.users USING btree (id) WHERE ((COALESCE(bio, ''::character varying))::text IS DISTINCT FROM ''::text); -CREATE INDEX tmp_index_ci_builds_lock_version ON public.ci_builds USING btree (id) WHERE (lock_version IS NULL); - -CREATE INDEX tmp_index_ci_pipelines_lock_version ON public.ci_pipelines USING btree (id) WHERE (lock_version IS NULL); +CREATE INDEX tmp_index_for_email_unconfirmation_migration ON public.emails USING btree (id) WHERE (confirmed_at IS NOT NULL); -CREATE INDEX tmp_index_ci_stages_lock_version ON public.ci_stages USING btree (id) WHERE (lock_version IS NULL); +CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON public.merge_request_metrics USING btree (merge_request_id); CREATE UNIQUE INDEX users_security_dashboard_projects_unique_index ON public.users_security_dashboard_projects USING btree (project_id, user_id); @@ -11260,6 +20688,262 @@ CREATE UNIQUE INDEX vulnerability_feedback_unique_idx ON public.vulnerability_fe CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON public.vulnerability_occurrence_pipelines USING btree (occurrence_id, pipeline_id); +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx10; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx11; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx12; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx13; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx14; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx15; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx16; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx17; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx18; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx19; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx20; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx21; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx22; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx23; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx24; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx25; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx26; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx27; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx28; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx29; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx30; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx31; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx32; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx33; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx34; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx35; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx36; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx37; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx38; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx39; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx40; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx41; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx42; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx43; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx44; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx45; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx46; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx47; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx48; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx49; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx50; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx51; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx52; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx53; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx54; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx55; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx56; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx57; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx58; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx59; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx60; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx61; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx62; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx63; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx1; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx2; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx3; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx4; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx5; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx6; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx7; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx8; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx9; + +ALTER INDEX public.index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experi_project_id_collector_tstamp_idx; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_00_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_01_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_02_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_03_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_04_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_05_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_06_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_07_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_08_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_09_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_10_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_11_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_12_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_13_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_14_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_15_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_16_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_17_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_18_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_19_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_20_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_21_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_22_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_23_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_24_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_25_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_26_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_27_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_28_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_29_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_30_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_31_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_32_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_33_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_34_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_35_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_36_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_37_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_38_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_39_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_40_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_41_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_42_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_43_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_44_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_45_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_46_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_47_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_48_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_49_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_50_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_51_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_52_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_53_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_54_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_55_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_56_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_57_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_58_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_59_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_60_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_61_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_62_pkey; + +ALTER INDEX public.product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey; + ALTER TABLE ONLY public.chat_names ADD CONSTRAINT fk_00797a2bf9 FOREIGN KEY (service_id) REFERENCES public.services(id) ON DELETE CASCADE; @@ -11299,6 +20983,9 @@ ALTER TABLE ONLY public.vulnerabilities ALTER TABLE ONLY public.vulnerabilities ADD CONSTRAINT fk_131d289c65 FOREIGN KEY (milestone_id) REFERENCES public.milestones(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.protected_branch_push_access_levels + ADD CONSTRAINT fk_15d2a7a4ae FOREIGN KEY (deploy_key_id) REFERENCES public.keys(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.internal_ids ADD CONSTRAINT fk_162941d509 FOREIGN KEY (namespace_id) REFERENCES public.namespaces(id) ON DELETE CASCADE; @@ -11422,6 +21109,9 @@ ALTER TABLE ONLY public.geo_event_log ALTER TABLE ONLY public.ci_build_trace_sections ADD CONSTRAINT fk_4ebe41f502 FOREIGN KEY (build_id) REFERENCES public.ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.alert_management_alerts + ADD CONSTRAINT fk_51ab4b6089 FOREIGN KEY (prometheus_alert_id) REFERENCES public.prometheus_alerts(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.path_locks ADD CONSTRAINT fk_5265c98f24 FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; @@ -11509,6 +21199,9 @@ ALTER TABLE ONLY public.vulnerabilities ALTER TABLE ONLY public.labels ADD CONSTRAINT fk_7de4989a69 FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.backup_labels + ADD CONSTRAINT fk_7de4989a69 FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.merge_requests ADD CONSTRAINT fk_7e85395a64 FOREIGN KEY (sprint_id) REFERENCES public.sprints(id) ON DELETE CASCADE; @@ -11629,6 +21322,9 @@ ALTER TABLE ONLY public.merge_requests ALTER TABLE ONLY public.epics ADD CONSTRAINT fk_aa5798e761 FOREIGN KEY (closed_by_id) REFERENCES public.users(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.alert_management_alerts + ADD CONSTRAINT fk_aad61aedca FOREIGN KEY (environment_id) REFERENCES public.environments(id) ON DELETE SET NULL; + ALTER TABLE ONLY public.identities ADD CONSTRAINT fk_aade90f0fc FOREIGN KEY (saml_provider_id) REFERENCES public.saml_providers(id) ON DELETE CASCADE; @@ -11644,6 +21340,9 @@ ALTER TABLE ONLY public.ci_variables ALTER TABLE ONLY public.merge_request_metrics ADD CONSTRAINT fk_ae440388cc FOREIGN KEY (latest_closed_by_id) REFERENCES public.users(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.analytics_cycle_analytics_group_stages + ADD CONSTRAINT fk_analytics_cycle_analytics_group_stages_group_value_stream_id FOREIGN KEY (group_value_stream_id) REFERENCES public.analytics_cycle_analytics_group_value_streams(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.fork_network_members ADD CONSTRAINT fk_b01280dae4 FOREIGN KEY (forked_from_project_id) REFERENCES public.projects(id) ON DELETE SET NULL; @@ -12088,6 +21787,9 @@ ALTER TABLE ONLY public.analytics_cycle_analytics_project_stages ALTER TABLE ONLY public.issue_user_mentions ADD CONSTRAINT fk_rails_3861d9fefa FOREIGN KEY (note_id) REFERENCES public.notes(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.namespace_settings + ADD CONSTRAINT fk_rails_3896d4fae5 FOREIGN KEY (namespace_id) REFERENCES public.namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.self_managed_prometheus_alert_events ADD CONSTRAINT fk_rails_3936dadc62 FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; @@ -12223,6 +21925,9 @@ ALTER TABLE ONLY public.project_repository_storage_moves ALTER TABLE ONLY public.x509_commit_signatures ADD CONSTRAINT fk_rails_53fe41188f FOREIGN KEY (x509_certificate_id) REFERENCES public.x509_certificates(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.analytics_cycle_analytics_group_value_streams + ADD CONSTRAINT fk_rails_540627381a FOREIGN KEY (group_id) REFERENCES public.namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.geo_node_namespace_links ADD CONSTRAINT fk_rails_546bf08d3e FOREIGN KEY (geo_node_id) REFERENCES public.geo_nodes(id) ON DELETE CASCADE; @@ -12241,6 +21946,9 @@ ALTER TABLE ONLY public.issue_user_mentions ALTER TABLE ONLY public.merge_request_assignees ADD CONSTRAINT fk_rails_579d375628 FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.clusters_applications_cilium + ADD CONSTRAINT fk_rails_59dc12eea6 FOREIGN KEY (cluster_id) REFERENCES public.clusters(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.analytics_cycle_analytics_group_stages ADD CONSTRAINT fk_rails_5a22f40223 FOREIGN KEY (start_event_label_id) REFERENCES public.labels(id) ON DELETE CASCADE; @@ -12253,6 +21961,9 @@ ALTER TABLE ONLY public.resource_label_events ALTER TABLE ONLY public.approval_merge_request_rules_groups ADD CONSTRAINT fk_rails_5b2ecf6139 FOREIGN KEY (approval_merge_request_rule_id) REFERENCES public.approval_merge_request_rules(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.namespace_limits + ADD CONSTRAINT fk_rails_5b3f2bc334 FOREIGN KEY (namespace_id) REFERENCES public.namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.protected_environment_deploy_access_levels ADD CONSTRAINT fk_rails_5b9f6970fe FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; @@ -12364,6 +22075,9 @@ ALTER TABLE ONLY public.project_compliance_framework_settings ALTER TABLE ONLY public.users_security_dashboard_projects ADD CONSTRAINT fk_rails_6f6cf8e66e FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.dast_sites + ADD CONSTRAINT fk_rails_6febb6ea9c FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.ci_builds_runner_session ADD CONSTRAINT fk_rails_70707857d3 FOREIGN KEY (build_id) REFERENCES public.ci_builds(id) ON DELETE CASCADE; @@ -12376,6 +22090,12 @@ ALTER TABLE ONLY public.project_custom_attributes ALTER TABLE ONLY public.slack_integrations ADD CONSTRAINT fk_rails_73db19721a FOREIGN KEY (service_id) REFERENCES public.services(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.custom_emoji + ADD CONSTRAINT fk_rails_745925b412 FOREIGN KEY (namespace_id) REFERENCES public.namespaces(id) ON DELETE CASCADE; + +ALTER TABLE ONLY public.dast_site_profiles + ADD CONSTRAINT fk_rails_747dc64abc FOREIGN KEY (dast_site_id) REFERENCES public.dast_sites(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.merge_request_context_commit_diff_files ADD CONSTRAINT fk_rails_74a00a1787 FOREIGN KEY (merge_request_context_commit_id) REFERENCES public.merge_request_context_commits(id) ON DELETE CASCADE; @@ -12418,6 +22138,9 @@ ALTER TABLE ONLY public.operations_scopes ALTER TABLE ONLY public.milestone_releases ADD CONSTRAINT fk_rails_7ae0756a2d FOREIGN KEY (milestone_id) REFERENCES public.milestones(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.resource_state_events + ADD CONSTRAINT fk_rails_7ddc5f7457 FOREIGN KEY (source_merge_request_id) REFERENCES public.merge_requests(id) ON DELETE SET NULL; + ALTER TABLE ONLY public.application_settings ADD CONSTRAINT fk_rails_7e112a9599 FOREIGN KEY (instance_administration_project_id) REFERENCES public.projects(id) ON DELETE SET NULL; @@ -12427,6 +22150,9 @@ ALTER TABLE ONLY public.clusters_kubernetes_namespaces ALTER TABLE ONLY public.approval_merge_request_rules_users ADD CONSTRAINT fk_rails_80e6801803 FOREIGN KEY (approval_merge_request_rule_id) REFERENCES public.approval_merge_request_rules(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.dast_site_profiles + ADD CONSTRAINT fk_rails_83e309d69e FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.deployment_merge_requests ADD CONSTRAINT fk_rails_86a6d8bf12 FOREIGN KEY (merge_request_id) REFERENCES public.merge_requests(id) ON DELETE CASCADE; @@ -12469,6 +22195,9 @@ ALTER TABLE ONLY public.packages_conan_metadata ALTER TABLE ONLY public.vulnerability_feedback ADD CONSTRAINT fk_rails_8c77e5891a FOREIGN KEY (issue_id) REFERENCES public.issues(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.ci_pipeline_messages + ADD CONSTRAINT fk_rails_8d3b04e3e1 FOREIGN KEY (pipeline_id) REFERENCES public.ci_pipelines(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.approval_merge_request_rules_approved_approvers ADD CONSTRAINT fk_rails_8dc94cff4d FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; @@ -12628,9 +22357,15 @@ ALTER TABLE ONLY public.metrics_dashboard_annotations ALTER TABLE ONLY public.pool_repositories ADD CONSTRAINT fk_rails_af3f8c5d62 FOREIGN KEY (shard_id) REFERENCES public.shards(id) ON DELETE RESTRICT; +ALTER TABLE ONLY public.vulnerability_statistics + ADD CONSTRAINT fk_rails_af61a7df4c FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.resource_label_events ADD CONSTRAINT fk_rails_b126799f57 FOREIGN KEY (label_id) REFERENCES public.labels(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.webauthn_registrations + ADD CONSTRAINT fk_rails_b15c016782 FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.packages_build_infos ADD CONSTRAINT fk_rails_b18868292d FOREIGN KEY (package_id) REFERENCES public.packages_packages(id) ON DELETE CASCADE; @@ -12697,6 +22432,9 @@ ALTER TABLE ONLY public.serverless_domain_cluster ALTER TABLE ONLY public.labels ADD CONSTRAINT fk_rails_c1ac5161d8 FOREIGN KEY (group_id) REFERENCES public.namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.backup_labels + ADD CONSTRAINT fk_rails_c1ac5161d8 FOREIGN KEY (group_id) REFERENCES public.namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.project_feature_usages ADD CONSTRAINT fk_rails_c22a50024b FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; @@ -12709,6 +22447,9 @@ ALTER TABLE ONLY public.project_repositories ALTER TABLE ONLY public.packages_nuget_dependency_link_metadata ADD CONSTRAINT fk_rails_c3313ee2e4 FOREIGN KEY (dependency_link_id) REFERENCES public.packages_dependency_links(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.group_deploy_keys_groups + ADD CONSTRAINT fk_rails_c3854f19f5 FOREIGN KEY (group_deploy_key_id) REFERENCES public.group_deploy_keys(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.merge_request_user_mentions ADD CONSTRAINT fk_rails_c440b9ea31 FOREIGN KEY (note_id) REFERENCES public.notes(id) ON DELETE CASCADE; @@ -12745,9 +22486,6 @@ ALTER TABLE ONLY public.gpg_signatures ALTER TABLE ONLY public.board_group_recent_visits ADD CONSTRAINT fk_rails_ca04c38720 FOREIGN KEY (board_id) REFERENCES public.boards(id) ON DELETE CASCADE; -ALTER TABLE ONLY public.ci_daily_report_results - ADD CONSTRAINT fk_rails_cc5caec7d9 FOREIGN KEY (last_pipeline_id) REFERENCES public.ci_pipelines(id) ON DELETE CASCADE; - ALTER TABLE ONLY public.issues_self_managed_prometheus_alert_events ADD CONSTRAINT fk_rails_cc5d88bbb0 FOREIGN KEY (issue_id) REFERENCES public.issues(id) ON DELETE CASCADE; @@ -12847,6 +22585,9 @@ ALTER TABLE ONLY public.merge_request_metrics ALTER TABLE ONLY public.draft_notes ADD CONSTRAINT fk_rails_e753681674 FOREIGN KEY (merge_request_id) REFERENCES public.merge_requests(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.group_deploy_keys_groups + ADD CONSTRAINT fk_rails_e87145115d FOREIGN KEY (group_id) REFERENCES public.namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY public.description_versions ADD CONSTRAINT fk_rails_e8f4caf9c7 FOREIGN KEY (epic_id) REFERENCES public.epics(id) ON DELETE CASCADE; @@ -12862,8 +22603,8 @@ ALTER TABLE ONLY public.protected_branch_unprotect_access_levels ALTER TABLE ONLY public.alert_management_alert_user_mentions ADD CONSTRAINT fk_rails_eb2de0cdef FOREIGN KEY (note_id) REFERENCES public.notes(id) ON DELETE CASCADE; -ALTER TABLE ONLY public.ci_daily_report_results - ADD CONSTRAINT fk_rails_ebc2931b90 FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.snippet_statistics + ADD CONSTRAINT fk_rails_ebc283ccf1 FOREIGN KEY (snippet_id) REFERENCES public.snippets(id) ON DELETE CASCADE; ALTER TABLE ONLY public.cluster_providers_aws ADD CONSTRAINT fk_rails_ed1fdfaeb2 FOREIGN KEY (created_by_user_id) REFERENCES public.users(id) ON DELETE SET NULL; @@ -12970,6 +22711,9 @@ ALTER TABLE ONLY public.timelogs ALTER TABLE ONLY public.u2f_registrations ADD CONSTRAINT fk_u2f_registrations_user_id FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; +ALTER TABLE public.product_analytics_events_experimental + ADD CONSTRAINT product_analytics_events_experimental_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; + COPY "schema_migrations" (version) FROM STDIN; 20181228175414 20190102152410 @@ -12998,7 +22742,6 @@ COPY "schema_migrations" (version) FROM STDIN; 20190220150130 20190222051615 20190225152525 -20190225160300 20190225160301 20190228192410 20190301081611 @@ -13377,6 +23120,7 @@ COPY "schema_migrations" (version) FROM STDIN; 20191112105448 20191112115247 20191112115317 +20191112212815 20191112214305 20191112221821 20191112232338 @@ -13653,6 +23397,7 @@ COPY "schema_migrations" (version) FROM STDIN; 20200227164113 20200227165129 20200228160542 +20200229171700 20200302142052 20200302152516 20200303055348 @@ -13671,6 +23416,10 @@ COPY "schema_migrations" (version) FROM STDIN; 20200304160801 20200304160823 20200304211738 +20200305020458 +20200305020459 +20200305082754 +20200305082858 20200305121159 20200305151736 20200305200641 @@ -13877,6 +23626,7 @@ COPY "schema_migrations" (version) FROM STDIN; 20200424043515 20200424050250 20200424101920 +20200424102023 20200424135319 20200427064130 20200428134356 @@ -13904,6 +23654,11 @@ COPY "schema_migrations" (version) FROM STDIN; 20200508140959 20200508203901 20200509203901 +20200510181937 +20200510182218 +20200510182556 +20200510182824 +20200510183128 20200511080113 20200511083541 20200511092246 @@ -13946,22 +23701,28 @@ COPY "schema_migrations" (version) FROM STDIN; 20200519141534 20200519171058 20200519194042 +20200519201128 20200520103514 20200521022725 20200521225327 20200521225337 20200521225346 +20200522205606 20200522235146 +20200524104346 20200525114553 20200525121014 20200525144525 20200526000407 20200526013844 +20200526115436 20200526120714 20200526142550 20200526153844 20200526164946 20200526164947 +20200526193555 +20200526231421 20200527092027 20200527094322 20200527095401 @@ -13971,6 +23732,7 @@ COPY "schema_migrations" (version) FROM STDIN; 20200527152657 20200527170649 20200527211000 +20200527211605 20200528054112 20200528123703 20200528125905 @@ -13981,23 +23743,126 @@ COPY "schema_migrations" (version) FROM STDIN; 20200602143020 20200603073101 20200603180338 +20200604001128 20200604143628 20200604145731 20200604174544 20200604174558 20200605003204 20200605093113 +20200605160806 +20200605160836 +20200605160851 20200608072931 20200608075553 +20200608195222 +20200608203426 +20200608205813 +20200608212030 +20200608212435 +20200608212549 +20200608212652 +20200608212807 +20200608212824 20200608214008 20200609002841 +20200609012539 20200609142506 20200609142507 20200609142508 20200609212701 +20200610130002 +20200613104045 20200615083635 +20200615111857 20200615121217 20200615123055 +20200615141554 +20200615193524 20200615232735 +20200615234047 +20200616124338 +20200616145031 +20200617000757 +20200617001001 +20200617001118 +20200617001637 +20200617001848 +20200617002030 +20200617150041 +20200617205000 +20200618105638 +20200618134223 +20200618134723 +20200618152212 +20200619000316 +20200619154527 +20200619154528 +20200622040750 +20200622070606 +20200622070620 +20200622095419 +20200622103836 +20200622104923 +20200622235737 +20200623000148 +20200623000320 +20200623073431 +20200623090030 +20200623121135 +20200623141217 +20200623141544 +20200623142159 +20200623170000 +20200623185440 +20200624075411 +20200624142107 +20200624142207 +20200624222443 +20200625045442 +20200625082258 +20200625113337 +20200625174052 +20200625190458 +20200626060151 +20200626130220 +20200628210938 +20200629192638 +20200630091656 +20200630110826 +20200701064756 +20200701070435 +20200701091253 +20200701093859 +20200701190523 +20200701205710 +20200702123805 +20200702201039 +20200703064117 +20200703121557 +20200703124823 +20200703125016 +20200703154822 +20200704143633 +20200704161600 +20200706005325 +20200706035141 +20200706154619 +20200706170536 +20200707071941 +20200707094341 +20200707095849 +20200708080631 +20200709101408 +20200710102418 +20200710102846 +20200710105332 +20200710130234 +20200712084655 +20200712235622 +20200713071042 +20200713152443 +20200716044023 +20200716120419 \. |