summaryrefslogtreecommitdiff
path: root/db/schema.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema.rb')
-rw-r--r--db/schema.rb1180
1 files changed, 1175 insertions, 5 deletions
diff --git a/db/schema.rb b/db/schema.rb
index 4ed7c0cb248..a67fa2a0bb0 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -45,6 +45,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.text "message_font_color"
t.string "favicon"
t.boolean "email_header_and_footer_enabled", default: false, null: false
+ t.integer "updated_by"
end
create_table "application_setting_terms", id: :serial, force: :cascade do |t|
@@ -153,7 +154,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.integer "throttle_authenticated_web_requests_per_period", default: 7200, null: false
t.integer "throttle_authenticated_web_period_in_seconds", default: 3600, null: false
t.boolean "password_authentication_enabled_for_web"
- t.boolean "password_authentication_enabled_for_git", default: true
+ t.boolean "password_authentication_enabled_for_git", default: true, null: false
t.integer "gitaly_timeout_default", default: 55, null: false
t.integer "gitaly_timeout_medium", default: 30, null: false
t.integer "gitaly_timeout_fast", default: 10, null: false
@@ -196,9 +197,136 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.boolean "dns_rebinding_protection_enabled", default: true, null: false
t.boolean "default_project_deletion_protection", default: false, null: false
t.boolean "lock_memberships_to_ldap", default: false, null: false
+ t.text "help_text"
+ t.boolean "elasticsearch_indexing", default: false, null: false
+ t.boolean "elasticsearch_search", default: false, null: false
+ t.integer "shared_runners_minutes", default: 0, null: false
+ t.bigint "repository_size_limit", default: 0
+ t.string "elasticsearch_url", default: "http://localhost:9200"
+ t.boolean "elasticsearch_aws", default: false, null: false
+ t.string "elasticsearch_aws_region", default: "us-east-1"
+ t.string "elasticsearch_aws_access_key"
+ t.string "elasticsearch_aws_secret_access_key"
+ t.integer "geo_status_timeout", default: 10
+ t.boolean "elasticsearch_experimental_indexer"
+ t.boolean "check_namespace_plan", default: false, null: false
+ t.integer "mirror_max_delay", default: 300, null: false
+ t.integer "mirror_max_capacity", default: 100, null: false
+ t.integer "mirror_capacity_threshold", default: 50, null: false
+ t.boolean "slack_app_enabled", default: false
+ t.string "slack_app_id"
+ t.string "slack_app_secret"
+ t.string "slack_app_verification_token"
+ t.boolean "allow_group_owners_to_manage_ldap", default: true, null: false
+ t.string "email_additional_text"
+ t.integer "file_template_project_id"
+ t.boolean "pseudonymizer_enabled", default: false, null: false
+ t.boolean "snowplow_enabled", default: false, null: false
+ t.string "snowplow_collector_uri"
+ t.string "snowplow_site_id"
+ t.string "snowplow_cookie_domain"
+ t.integer "custom_project_templates_group_id"
+ t.boolean "elasticsearch_limit_indexing", default: false, null: false
+ t.string "geo_node_allowed_ips", default: "0.0.0.0/0, ::/0"
+ t.index ["custom_project_templates_group_id"], name: "index_application_settings_on_custom_project_templates_group_id", using: :btree
+ t.index ["file_template_project_id"], name: "index_application_settings_on_file_template_project_id", using: :btree
t.index ["usage_stats_set_by_user_id"], name: "index_application_settings_on_usage_stats_set_by_user_id", using: :btree
end
+ create_table "approval_merge_request_rule_sources", force: :cascade do |t|
+ t.bigint "approval_merge_request_rule_id", null: false
+ t.bigint "approval_project_rule_id", null: false
+ t.index ["approval_merge_request_rule_id"], name: "index_approval_merge_request_rule_sources_1", unique: true, using: :btree
+ t.index ["approval_project_rule_id"], name: "index_approval_merge_request_rule_sources_2", using: :btree
+ end
+
+ create_table "approval_merge_request_rules", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "merge_request_id", null: false
+ t.integer "approvals_required", limit: 2, default: 0, null: false
+ t.boolean "code_owner", default: false, null: false
+ t.string "name", null: false
+ t.integer "rule_type", limit: 2, default: 1, null: false
+ t.index ["merge_request_id", "code_owner", "name"], name: "approval_rule_name_index_for_code_owners", unique: true, where: "(code_owner = true)", using: :btree
+ t.index ["merge_request_id", "code_owner"], name: "index_approval_merge_request_rules_1", using: :btree
+ t.index ["merge_request_id", "rule_type", "name"], name: "index_approval_rule_name_for_code_owners_rule_type", unique: true, where: "(rule_type = 2)", using: :btree
+ t.index ["merge_request_id", "rule_type"], name: "index_approval_rules_code_owners_rule_type", where: "(rule_type = 2)", using: :btree
+ end
+
+ create_table "approval_merge_request_rules_approved_approvers", force: :cascade do |t|
+ t.bigint "approval_merge_request_rule_id", null: false
+ t.integer "user_id", null: false
+ t.index ["approval_merge_request_rule_id", "user_id"], name: "index_approval_merge_request_rules_approved_approvers_1", unique: true, using: :btree
+ t.index ["user_id"], name: "index_approval_merge_request_rules_approved_approvers_2", using: :btree
+ end
+
+ create_table "approval_merge_request_rules_groups", force: :cascade do |t|
+ t.bigint "approval_merge_request_rule_id", null: false
+ t.integer "group_id", null: false
+ t.index ["approval_merge_request_rule_id", "group_id"], name: "index_approval_merge_request_rules_groups_1", unique: true, using: :btree
+ t.index ["group_id"], name: "index_approval_merge_request_rules_groups_2", using: :btree
+ end
+
+ create_table "approval_merge_request_rules_users", force: :cascade do |t|
+ t.bigint "approval_merge_request_rule_id", null: false
+ t.integer "user_id", null: false
+ t.index ["approval_merge_request_rule_id", "user_id"], name: "index_approval_merge_request_rules_users_1", unique: true, using: :btree
+ t.index ["user_id"], name: "index_approval_merge_request_rules_users_2", using: :btree
+ end
+
+ create_table "approval_project_rules", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "project_id", null: false
+ t.integer "approvals_required", limit: 2, default: 0, null: false
+ t.string "name", null: false
+ t.index ["project_id"], name: "index_approval_project_rules_on_project_id", using: :btree
+ end
+
+ create_table "approval_project_rules_groups", force: :cascade do |t|
+ t.bigint "approval_project_rule_id", null: false
+ t.integer "group_id", null: false
+ t.index ["approval_project_rule_id", "group_id"], name: "index_approval_project_rules_groups_1", unique: true, using: :btree
+ t.index ["group_id"], name: "index_approval_project_rules_groups_2", using: :btree
+ end
+
+ create_table "approval_project_rules_users", force: :cascade do |t|
+ t.bigint "approval_project_rule_id", null: false
+ t.integer "user_id", null: false
+ t.index ["approval_project_rule_id", "user_id"], name: "index_approval_project_rules_users_1", unique: true, using: :btree
+ t.index ["user_id"], name: "index_approval_project_rules_users_2", using: :btree
+ end
+
+ create_table "approvals", id: :serial, force: :cascade do |t|
+ t.integer "merge_request_id", null: false
+ t.integer "user_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.index ["merge_request_id"], name: "index_approvals_on_merge_request_id", using: :btree
+ t.index ["user_id", "merge_request_id"], name: "index_approvals_on_user_id_and_merge_request_id", unique: true, using: :btree
+ end
+
+ create_table "approver_groups", id: :serial, force: :cascade do |t|
+ t.integer "target_id", null: false
+ t.string "target_type", null: false
+ t.integer "group_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.index ["group_id"], name: "index_approver_groups_on_group_id", using: :btree
+ t.index ["target_id", "target_type"], name: "index_approver_groups_on_target_id_and_target_type", using: :btree
+ end
+
+ create_table "approvers", id: :serial, force: :cascade do |t|
+ t.integer "target_id", null: false
+ t.string "target_type"
+ t.integer "user_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.index ["target_id", "target_type"], name: "index_approvers_on_target_id_and_target_type", using: :btree
+ t.index ["user_id"], name: "index_approvers_on_user_id", using: :btree
+ end
+
create_table "audit_events", id: :serial, force: :cascade do |t|
t.integer "author_id", null: false
t.string "type", null: false
@@ -233,6 +361,13 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["project_id"], name: "index_badges_on_project_id", using: :btree
end
+ create_table "board_assignees", id: :serial, force: :cascade do |t|
+ t.integer "board_id", null: false
+ t.integer "assignee_id", null: false
+ t.index ["assignee_id"], name: "index_board_assignees_on_assignee_id", using: :btree
+ t.index ["board_id", "assignee_id"], name: "index_board_assignees_on_board_id_and_assignee_id", unique: true, using: :btree
+ end
+
create_table "board_group_recent_visits", force: :cascade do |t|
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
@@ -245,6 +380,13 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["user_id"], name: "index_board_group_recent_visits_on_user_id", using: :btree
end
+ create_table "board_labels", id: :serial, force: :cascade do |t|
+ t.integer "board_id", null: false
+ t.integer "label_id", null: false
+ t.index ["board_id", "label_id"], name: "index_board_labels_on_board_id_and_label_id", unique: true, using: :btree
+ t.index ["label_id"], name: "index_board_labels_on_label_id", using: :btree
+ end
+
create_table "board_project_recent_visits", force: :cascade do |t|
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
@@ -262,7 +404,11 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "group_id"
+ t.integer "milestone_id"
+ t.integer "weight"
+ t.string "name", default: "Development", null: false
t.index ["group_id"], name: "index_boards_on_group_id", using: :btree
+ t.index ["milestone_id"], name: "index_boards_on_milestone_id", using: :btree
t.index ["project_id"], name: "index_boards_on_project_id", using: :btree
end
@@ -375,6 +521,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.integer "failure_reason"
t.datetime_with_timezone "scheduled_at"
t.string "token_encrypted"
+ t.integer "upstream_pipeline_id"
t.index ["artifacts_expire_at"], name: "index_ci_builds_on_artifacts_expire_at", where: "(artifacts_file <> ''::text)", using: :btree
t.index ["auto_canceled_by_id"], name: "index_ci_builds_on_auto_canceled_by_id", using: :btree
t.index ["commit_id", "artifacts_expire_at", "id"], name: "index_ci_builds_on_commit_id_and_artifacts_expireatandidpartial", where: "(((type)::text = 'Ci::Build'::text) AND ((retried = false) OR (retried IS NULL)) AND ((name)::text = ANY (ARRAY[('sast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('sast:container'::character varying)::text, ('container_scanning'::character varying)::text, ('dast'::character varying)::text])))", using: :btree
@@ -382,6 +529,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["commit_id", "status", "type"], name: "index_ci_builds_on_commit_id_and_status_and_type", using: :btree
t.index ["commit_id", "type", "name", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_name_and_ref", using: :btree
t.index ["commit_id", "type", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_ref", using: :btree
+ t.index ["name"], name: "index_ci_builds_on_name_for_security_products_values", 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]))", using: :btree
t.index ["project_id", "id"], name: "index_ci_builds_on_project_id_and_id", using: :btree
t.index ["project_id", "status"], name: "index_ci_builds_project_id_and_status_for_live_jobs_partial2", where: "(((type)::text = 'Ci::Build'::text) AND ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text])))", using: :btree
t.index ["protected"], name: "index_ci_builds_on_protected", using: :btree
@@ -394,6 +542,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["token"], name: "index_ci_builds_on_token", unique: true, using: :btree
t.index ["token_encrypted"], name: "index_ci_builds_on_token_encrypted", unique: true, where: "(token_encrypted IS NOT NULL)", using: :btree
t.index ["updated_at"], name: "index_ci_builds_on_updated_at", using: :btree
+ t.index ["upstream_pipeline_id"], name: "index_ci_builds_on_upstream_pipeline_id", where: "(upstream_pipeline_id IS NOT NULL)", using: :btree
t.index ["user_id"], name: "index_ci_builds_on_user_id", using: :btree
end
@@ -582,6 +731,19 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["token_encrypted"], name: "index_ci_runners_on_token_encrypted", using: :btree
end
+ create_table "ci_sources_pipelines", id: :serial, force: :cascade do |t|
+ t.integer "project_id"
+ t.integer "pipeline_id"
+ t.integer "source_project_id"
+ t.integer "source_job_id"
+ t.integer "source_pipeline_id"
+ t.index ["pipeline_id"], name: "index_ci_sources_pipelines_on_pipeline_id", using: :btree
+ t.index ["project_id"], name: "index_ci_sources_pipelines_on_project_id", using: :btree
+ t.index ["source_job_id"], name: "index_ci_sources_pipelines_on_source_job_id", using: :btree
+ t.index ["source_pipeline_id"], name: "index_ci_sources_pipelines_on_source_pipeline_id", using: :btree
+ t.index ["source_project_id"], name: "index_ci_sources_pipelines_on_source_project_id", using: :btree
+ end
+
create_table "ci_stages", id: :serial, force: :cascade do |t|
t.integer "project_id"
t.integer "pipeline_id"
@@ -770,6 +932,9 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.text "status_reason"
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
+ t.string "encrypted_alert_manager_token"
+ t.string "encrypted_alert_manager_token_iv"
+ t.datetime_with_timezone "last_update_started_at"
t.index ["cluster_id"], name: "index_clusters_applications_prometheus_on_cluster_id", unique: true, using: :btree
end
@@ -846,6 +1011,25 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.float "percentage_service_desk_issues", default: 0.0, null: false
end
+ create_table "dependency_proxy_blobs", id: :serial, force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.text "file", null: false
+ t.string "file_name", null: false
+ t.integer "file_store"
+ t.integer "group_id", null: false
+ t.bigint "size"
+ t.datetime_with_timezone "updated_at", null: false
+ t.index ["group_id", "file_name"], name: "index_dependency_proxy_blobs_on_group_id_and_file_name", using: :btree
+ end
+
+ create_table "dependency_proxy_group_settings", id: :serial, force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.boolean "enabled", default: false, null: false
+ t.integer "group_id", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.index ["group_id"], name: "index_dependency_proxy_group_settings_on_group_id", using: :btree
+ end
+
create_table "deploy_keys_projects", id: :serial, force: :cascade do |t|
t.integer "deploy_key_id", null: false
t.integer "project_id", null: false
@@ -893,6 +1077,55 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["project_id", "status"], name: "index_deployments_on_project_id_and_status", using: :btree
end
+ create_table "design_management_designs", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.integer "issue_id", null: false
+ t.string "filename", null: false
+ t.index ["issue_id", "filename"], name: "index_design_management_designs_on_issue_id_and_filename", unique: true, using: :btree
+ t.index ["project_id"], name: "index_design_management_designs_on_project_id", using: :btree
+ end
+
+ create_table "design_management_designs_versions", id: false, force: :cascade do |t|
+ t.bigint "design_id", null: false
+ t.bigint "version_id", null: false
+ t.index ["design_id", "version_id"], name: "design_management_designs_versions_uniqueness", unique: true, using: :btree
+ t.index ["design_id"], name: "index_design_management_designs_versions_on_design_id", using: :btree
+ t.index ["version_id"], name: "index_design_management_designs_versions_on_version_id", using: :btree
+ end
+
+ create_table "design_management_versions", force: :cascade do |t|
+ t.binary "sha", null: false
+ t.index ["sha"], name: "index_design_management_versions_on_sha", unique: true, using: :btree
+ end
+
+ create_table "draft_notes", force: :cascade do |t|
+ t.integer "merge_request_id", null: false
+ t.integer "author_id", null: false
+ t.boolean "resolve_discussion", default: false, null: false
+ t.string "discussion_id"
+ t.text "note", null: false
+ t.text "position"
+ t.text "original_position"
+ t.text "change_position"
+ t.index ["author_id"], name: "index_draft_notes_on_author_id", using: :btree
+ t.index ["discussion_id"], name: "index_draft_notes_on_discussion_id", using: :btree
+ t.index ["merge_request_id"], name: "index_draft_notes_on_merge_request_id", using: :btree
+ end
+
+ create_table "elasticsearch_indexed_namespaces", id: false, force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "namespace_id"
+ t.index ["namespace_id"], name: "index_elasticsearch_indexed_namespaces_on_namespace_id", unique: true, using: :btree
+ end
+
+ create_table "elasticsearch_indexed_projects", id: false, force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "project_id"
+ t.index ["project_id"], name: "index_elasticsearch_indexed_projects_on_project_id", unique: true, using: :btree
+ end
+
create_table "emails", id: :serial, force: :cascade do |t|
t.integer "user_id", null: false
t.string "email", null: false
@@ -915,10 +1148,67 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.string "environment_type"
t.string "state", default: "available", null: false
t.string "slug", null: false
+ t.index ["name"], name: "index_environments_on_name_varchar_pattern_ops", using: :btree, opclasses: {"name"=>"varchar_pattern_ops"}
t.index ["project_id", "name"], name: "index_environments_on_project_id_and_name", unique: true, using: :btree
t.index ["project_id", "slug"], name: "index_environments_on_project_id_and_slug", unique: true, using: :btree
end
+ create_table "epic_issues", id: :serial, force: :cascade do |t|
+ t.integer "epic_id", null: false
+ t.integer "issue_id", null: false
+ t.integer "relative_position", default: 1073741823, null: false
+ t.index ["epic_id"], name: "index_epic_issues_on_epic_id", using: :btree
+ t.index ["issue_id"], name: "index_epic_issues_on_issue_id", unique: true, using: :btree
+ end
+
+ create_table "epic_metrics", id: :serial, force: :cascade do |t|
+ t.integer "epic_id", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["epic_id"], name: "index_epic_metrics", using: :btree
+ end
+
+ create_table "epics", id: :serial, force: :cascade do |t|
+ t.integer "milestone_id"
+ t.integer "group_id", null: false
+ t.integer "author_id", null: false
+ t.integer "assignee_id"
+ t.integer "iid", null: false
+ t.integer "cached_markdown_version"
+ t.integer "updated_by_id"
+ t.integer "last_edited_by_id"
+ t.integer "lock_version"
+ t.date "start_date"
+ t.date "end_date"
+ t.datetime "last_edited_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.string "title", null: false
+ t.string "title_html", null: false
+ t.text "description"
+ t.text "description_html"
+ t.integer "start_date_sourcing_milestone_id"
+ t.integer "due_date_sourcing_milestone_id"
+ t.date "start_date_fixed"
+ t.date "due_date_fixed"
+ t.boolean "start_date_is_fixed"
+ t.boolean "due_date_is_fixed"
+ t.integer "state", limit: 2, default: 1, null: false
+ t.integer "closed_by_id"
+ t.datetime "closed_at"
+ t.integer "parent_id"
+ t.integer "relative_position"
+ t.index ["assignee_id"], name: "index_epics_on_assignee_id", using: :btree
+ t.index ["author_id"], name: "index_epics_on_author_id", using: :btree
+ t.index ["closed_by_id"], name: "index_epics_on_closed_by_id", using: :btree
+ t.index ["end_date"], name: "index_epics_on_end_date", using: :btree
+ t.index ["group_id"], name: "index_epics_on_group_id", using: :btree
+ t.index ["iid"], name: "index_epics_on_iid", using: :btree
+ t.index ["milestone_id"], name: "index_milestone", using: :btree
+ t.index ["parent_id"], name: "index_epics_on_parent_id", using: :btree
+ t.index ["start_date"], name: "index_epics_on_start_date", using: :btree
+ end
+
create_table "events", id: :serial, force: :cascade do |t|
t.integer "project_id"
t.integer "author_id", null: false
@@ -973,6 +1263,227 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["forked_to_project_id"], name: "index_forked_project_links_on_forked_to_project_id", unique: true, using: :btree
end
+ create_table "geo_cache_invalidation_events", force: :cascade do |t|
+ t.string "key", null: false
+ end
+
+ create_table "geo_event_log", force: :cascade do |t|
+ t.datetime "created_at", null: false
+ t.bigint "repository_updated_event_id"
+ t.bigint "repository_deleted_event_id"
+ t.bigint "repository_renamed_event_id"
+ t.bigint "repositories_changed_event_id"
+ t.bigint "repository_created_event_id"
+ t.bigint "hashed_storage_migrated_event_id"
+ t.bigint "lfs_object_deleted_event_id"
+ t.bigint "hashed_storage_attachments_event_id"
+ t.bigint "upload_deleted_event_id"
+ t.bigint "job_artifact_deleted_event_id"
+ t.bigint "reset_checksum_event_id"
+ t.bigint "cache_invalidation_event_id"
+ t.index ["cache_invalidation_event_id"], name: "index_geo_event_log_on_cache_invalidation_event_id", where: "(cache_invalidation_event_id IS NOT NULL)", using: :btree
+ t.index ["hashed_storage_attachments_event_id"], name: "index_geo_event_log_on_hashed_storage_attachments_event_id", where: "(hashed_storage_attachments_event_id IS NOT NULL)", using: :btree
+ t.index ["hashed_storage_migrated_event_id"], name: "index_geo_event_log_on_hashed_storage_migrated_event_id", where: "(hashed_storage_migrated_event_id IS NOT NULL)", using: :btree
+ t.index ["job_artifact_deleted_event_id"], name: "index_geo_event_log_on_job_artifact_deleted_event_id", where: "(job_artifact_deleted_event_id IS NOT NULL)", using: :btree
+ t.index ["lfs_object_deleted_event_id"], name: "index_geo_event_log_on_lfs_object_deleted_event_id", where: "(lfs_object_deleted_event_id IS NOT NULL)", using: :btree
+ t.index ["repositories_changed_event_id"], name: "index_geo_event_log_on_repositories_changed_event_id", where: "(repositories_changed_event_id IS NOT NULL)", using: :btree
+ t.index ["repository_created_event_id"], name: "index_geo_event_log_on_repository_created_event_id", where: "(repository_created_event_id IS NOT NULL)", using: :btree
+ t.index ["repository_deleted_event_id"], name: "index_geo_event_log_on_repository_deleted_event_id", where: "(repository_deleted_event_id IS NOT NULL)", using: :btree
+ t.index ["repository_renamed_event_id"], name: "index_geo_event_log_on_repository_renamed_event_id", where: "(repository_renamed_event_id IS NOT NULL)", using: :btree
+ t.index ["repository_updated_event_id"], name: "index_geo_event_log_on_repository_updated_event_id", where: "(repository_updated_event_id IS NOT NULL)", using: :btree
+ t.index ["reset_checksum_event_id"], name: "index_geo_event_log_on_reset_checksum_event_id", where: "(reset_checksum_event_id IS NOT NULL)", using: :btree
+ t.index ["upload_deleted_event_id"], name: "index_geo_event_log_on_upload_deleted_event_id", where: "(upload_deleted_event_id IS NOT NULL)", using: :btree
+ end
+
+ create_table "geo_hashed_storage_attachments_events", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.text "old_attachments_path", null: false
+ t.text "new_attachments_path", null: false
+ t.index ["project_id"], name: "index_geo_hashed_storage_attachments_events_on_project_id", using: :btree
+ end
+
+ create_table "geo_hashed_storage_migrated_events", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.text "repository_storage_name", null: false
+ t.text "old_disk_path", null: false
+ t.text "new_disk_path", null: false
+ t.text "old_wiki_disk_path", null: false
+ t.text "new_wiki_disk_path", null: false
+ t.integer "old_storage_version", limit: 2
+ t.integer "new_storage_version", limit: 2, null: false
+ t.index ["project_id"], name: "index_geo_hashed_storage_migrated_events_on_project_id", using: :btree
+ end
+
+ create_table "geo_job_artifact_deleted_events", force: :cascade do |t|
+ t.integer "job_artifact_id", null: false
+ t.string "file_path", null: false
+ t.index ["job_artifact_id"], name: "index_geo_job_artifact_deleted_events_on_job_artifact_id", using: :btree
+ end
+
+ create_table "geo_lfs_object_deleted_events", force: :cascade do |t|
+ t.integer "lfs_object_id", null: false
+ t.string "oid", null: false
+ t.string "file_path", null: false
+ t.index ["lfs_object_id"], name: "index_geo_lfs_object_deleted_events_on_lfs_object_id", using: :btree
+ end
+
+ create_table "geo_node_namespace_links", id: :serial, force: :cascade do |t|
+ t.integer "geo_node_id", null: false
+ t.integer "namespace_id", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["geo_node_id", "namespace_id"], name: "index_geo_node_namespace_links_on_geo_node_id_and_namespace_id", unique: true, using: :btree
+ t.index ["geo_node_id"], name: "index_geo_node_namespace_links_on_geo_node_id", using: :btree
+ t.index ["namespace_id"], name: "index_geo_node_namespace_links_on_namespace_id", using: :btree
+ end
+
+ create_table "geo_node_statuses", id: :serial, force: :cascade do |t|
+ t.integer "geo_node_id", null: false
+ t.integer "db_replication_lag_seconds"
+ t.integer "repositories_synced_count"
+ t.integer "repositories_failed_count"
+ t.integer "lfs_objects_count"
+ t.integer "lfs_objects_synced_count"
+ t.integer "lfs_objects_failed_count"
+ t.integer "attachments_count"
+ t.integer "attachments_synced_count"
+ t.integer "attachments_failed_count"
+ t.integer "last_event_id"
+ t.datetime "last_event_date"
+ t.integer "cursor_last_event_id"
+ t.datetime "cursor_last_event_date"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.datetime "last_successful_status_check_at"
+ t.string "status_message"
+ t.integer "replication_slots_count"
+ t.integer "replication_slots_used_count"
+ t.bigint "replication_slots_max_retained_wal_bytes"
+ t.integer "wikis_synced_count"
+ t.integer "wikis_failed_count"
+ t.integer "job_artifacts_count"
+ t.integer "job_artifacts_synced_count"
+ t.integer "job_artifacts_failed_count"
+ t.string "version"
+ t.string "revision"
+ t.integer "repositories_verified_count"
+ t.integer "repositories_verification_failed_count"
+ t.integer "wikis_verified_count"
+ t.integer "wikis_verification_failed_count"
+ t.integer "lfs_objects_synced_missing_on_primary_count"
+ t.integer "job_artifacts_synced_missing_on_primary_count"
+ t.integer "attachments_synced_missing_on_primary_count"
+ t.integer "repositories_checksummed_count"
+ t.integer "repositories_checksum_failed_count"
+ t.integer "repositories_checksum_mismatch_count"
+ t.integer "wikis_checksummed_count"
+ t.integer "wikis_checksum_failed_count"
+ t.integer "wikis_checksum_mismatch_count"
+ t.binary "storage_configuration_digest"
+ t.integer "repositories_retrying_verification_count"
+ t.integer "wikis_retrying_verification_count"
+ t.integer "projects_count"
+ t.index ["geo_node_id"], name: "index_geo_node_statuses_on_geo_node_id", unique: true, using: :btree
+ end
+
+ create_table "geo_nodes", id: :serial, force: :cascade do |t|
+ t.boolean "primary"
+ t.integer "oauth_application_id"
+ t.boolean "enabled", default: true, null: false
+ t.string "access_key"
+ t.string "encrypted_secret_access_key"
+ t.string "encrypted_secret_access_key_iv"
+ t.string "clone_url_prefix"
+ t.integer "files_max_capacity", default: 10, null: false
+ t.integer "repos_max_capacity", default: 25, null: false
+ t.string "url", null: false
+ t.string "selective_sync_type"
+ t.text "selective_sync_shards"
+ t.integer "verification_max_capacity", default: 100, null: false
+ t.integer "minimum_reverification_interval", default: 7, null: false
+ t.string "internal_url"
+ t.string "name", null: false
+ t.index ["access_key"], name: "index_geo_nodes_on_access_key", using: :btree
+ t.index ["name"], name: "index_geo_nodes_on_name", unique: true, using: :btree
+ t.index ["primary"], name: "index_geo_nodes_on_primary", using: :btree
+ end
+
+ create_table "geo_repositories_changed_events", force: :cascade do |t|
+ t.integer "geo_node_id", null: false
+ t.index ["geo_node_id"], name: "index_geo_repositories_changed_events_on_geo_node_id", using: :btree
+ end
+
+ create_table "geo_repository_created_events", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.text "repository_storage_name", null: false
+ t.text "repo_path", null: false
+ t.text "wiki_path"
+ t.text "project_name", null: false
+ t.index ["project_id"], name: "index_geo_repository_created_events_on_project_id", using: :btree
+ end
+
+ create_table "geo_repository_deleted_events", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.text "repository_storage_name", null: false
+ t.text "deleted_path", null: false
+ t.text "deleted_wiki_path"
+ t.text "deleted_project_name", null: false
+ t.index ["project_id"], name: "index_geo_repository_deleted_events_on_project_id", using: :btree
+ end
+
+ create_table "geo_repository_renamed_events", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.text "repository_storage_name", null: false
+ t.text "old_path_with_namespace", null: false
+ t.text "new_path_with_namespace", null: false
+ t.text "old_wiki_path_with_namespace", null: false
+ t.text "new_wiki_path_with_namespace", null: false
+ t.text "old_path", null: false
+ t.text "new_path", null: false
+ t.index ["project_id"], name: "index_geo_repository_renamed_events_on_project_id", using: :btree
+ end
+
+ create_table "geo_repository_updated_events", force: :cascade do |t|
+ t.integer "branches_affected", null: false
+ t.integer "tags_affected", null: false
+ t.integer "project_id", null: false
+ t.integer "source", limit: 2, null: false
+ t.boolean "new_branch", default: false, null: false
+ t.boolean "remove_branch", default: false, null: false
+ t.text "ref"
+ t.index ["project_id"], name: "index_geo_repository_updated_events_on_project_id", using: :btree
+ t.index ["source"], name: "index_geo_repository_updated_events_on_source", using: :btree
+ end
+
+ create_table "geo_reset_checksum_events", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.index ["project_id"], name: "index_geo_reset_checksum_events_on_project_id", using: :btree
+ end
+
+ create_table "geo_upload_deleted_events", force: :cascade do |t|
+ t.integer "upload_id", null: false
+ t.string "file_path", null: false
+ t.integer "model_id", null: false
+ t.string "model_type", null: false
+ t.string "uploader", null: false
+ t.index ["upload_id"], name: "index_geo_upload_deleted_events_on_upload_id", using: :btree
+ end
+
+ create_table "gitlab_subscriptions", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.date "start_date"
+ t.date "end_date"
+ t.date "trial_ends_on"
+ t.integer "namespace_id"
+ t.integer "hosted_plan_id"
+ t.integer "max_seats_used", default: 0
+ t.integer "seats", default: 0
+ t.boolean "trial", default: false
+ t.index ["hosted_plan_id"], name: "index_gitlab_subscriptions_on_hosted_plan_id", using: :btree
+ t.index ["namespace_id"], name: "index_gitlab_subscriptions_on_namespace_id", unique: true, using: :btree
+ end
+
create_table "gpg_key_subkeys", id: :serial, force: :cascade do |t|
t.integer "gpg_key_id", null: false
t.binary "keyid"
@@ -1022,12 +1533,22 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["key", "value"], name: "index_group_custom_attributes_on_key_and_value", using: :btree
end
+ create_table "historical_data", id: :serial, force: :cascade do |t|
+ t.date "date", null: false
+ t.integer "active_user_count"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "identities", id: :serial, force: :cascade do |t|
t.string "extern_uid"
t.string "provider"
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
+ t.integer "saml_provider_id"
+ t.string "secondary_extern_uid"
+ t.index ["saml_provider_id"], name: "index_identities_on_saml_provider_id", where: "(saml_provider_id IS NOT NULL)", using: :btree
t.index ["user_id"], name: "index_identities_on_user_id", using: :btree
end
@@ -1040,6 +1561,23 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["updated_at"], name: "index_import_export_uploads_on_updated_at", using: :btree
end
+ create_table "index_statuses", id: :serial, force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.datetime "indexed_at"
+ t.text "note"
+ t.string "last_commit"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["project_id"], name: "index_index_statuses_on_project_id", unique: true, using: :btree
+ end
+
+ create_table "insights", id: :serial, force: :cascade do |t|
+ t.integer "namespace_id", null: false
+ t.integer "project_id", null: false
+ t.index ["namespace_id"], name: "index_insights_on_namespace_id", using: :btree
+ t.index ["project_id"], name: "index_insights_on_project_id", using: :btree
+ end
+
create_table "internal_ids", force: :cascade do |t|
t.integer "project_id"
t.integer "usage", null: false
@@ -1058,6 +1596,16 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["user_id"], name: "index_issue_assignees_on_user_id", using: :btree
end
+ create_table "issue_links", id: :serial, force: :cascade do |t|
+ t.integer "source_id", null: false
+ t.integer "target_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.index ["source_id", "target_id"], name: "index_issue_links_on_source_id_and_target_id", unique: true, using: :btree
+ t.index ["source_id"], name: "index_issue_links_on_source_id", using: :btree
+ t.index ["target_id"], name: "index_issue_links_on_target_id", using: :btree
+ end
+
create_table "issue_metrics", id: :serial, force: :cascade do |t|
t.integer "issue_id", null: false
t.datetime "first_mentioned_in_commit_at"
@@ -1094,6 +1642,8 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.datetime_with_timezone "closed_at"
t.integer "closed_by_id"
t.integer "state_id", limit: 2
+ t.string "service_desk_reply_to"
+ t.integer "weight"
t.index ["author_id"], name: "index_issues_on_author_id", using: :btree
t.index ["closed_by_id"], name: "index_issues_on_closed_by_id", using: :btree
t.index ["confidential"], name: "index_issues_on_confidential", using: :btree
@@ -1165,6 +1715,16 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["type", "project_id"], name: "index_labels_on_type_and_project_id", using: :btree
end
+ create_table "ldap_group_links", id: :serial, force: :cascade do |t|
+ t.string "cn"
+ t.integer "group_access", null: false
+ t.integer "group_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "provider"
+ t.string "filter"
+ end
+
create_table "lfs_file_locks", id: :serial, force: :cascade do |t|
t.integer "project_id", null: false
t.integer "user_id", null: false
@@ -1193,6 +1753,12 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["project_id"], name: "index_lfs_objects_projects_on_project_id", using: :btree
end
+ create_table "licenses", id: :serial, force: :cascade do |t|
+ t.text "data", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "lists", id: :serial, force: :cascade do |t|
t.integer "board_id", null: false
t.integer "label_id"
@@ -1200,9 +1766,13 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.integer "position"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.integer "milestone_id"
+ t.integer "user_id"
t.index ["board_id", "label_id"], name: "index_lists_on_board_id_and_label_id", unique: true, using: :btree
t.index ["label_id"], name: "index_lists_on_label_id", using: :btree
t.index ["list_type"], name: "index_lists_on_list_type", using: :btree
+ t.index ["milestone_id"], name: "index_lists_on_milestone_id", using: :btree
+ t.index ["user_id"], name: "index_lists_on_user_id", using: :btree
end
create_table "members", id: :serial, force: :cascade do |t|
@@ -1220,6 +1790,8 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.datetime "invite_accepted_at"
t.datetime "requested_at"
t.date "expires_at"
+ t.boolean "ldap", default: false, null: false
+ t.boolean "override", default: false, null: false
t.index ["access_level"], name: "index_members_on_access_level", using: :btree
t.index ["invite_token"], name: "index_members_on_invite_token", unique: true, using: :btree
t.index ["requested_at"], name: "index_members_on_requested_at", using: :btree
@@ -1352,6 +1924,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.boolean "squash", default: false, null: false
t.boolean "allow_maintainer_to_push"
t.integer "state_id", limit: 2
+ t.integer "approvals_before_merge"
t.index ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree
t.index ["author_id"], name: "index_merge_requests_on_author_id", using: :btree
t.index ["created_at"], name: "index_merge_requests_on_created_at", using: :btree
@@ -1419,6 +1992,13 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["title"], name: "index_milestones_on_title_trigram", using: :gin, opclasses: {"title"=>"gin_trgm_ops"}
end
+ create_table "namespace_statistics", id: :serial, force: :cascade do |t|
+ t.integer "namespace_id", null: false
+ t.integer "shared_runners_seconds", default: 0, null: false
+ t.datetime "shared_runners_seconds_last_reset"
+ t.index ["namespace_id"], name: "index_namespace_statistics_on_namespace_id", unique: true, using: :btree
+ end
+
create_table "namespaces", id: :serial, force: :cascade do |t|
t.string "name", null: false
t.string "path", null: false
@@ -1442,16 +2022,37 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.integer "project_creation_level"
t.boolean "auto_devops_enabled"
t.datetime_with_timezone "last_ci_minutes_notification_at"
+ t.integer "custom_project_templates_group_id"
+ t.integer "file_template_project_id"
+ t.string "ldap_sync_error"
+ t.datetime "ldap_sync_last_successful_update_at"
+ t.datetime "ldap_sync_last_sync_at"
+ t.datetime "ldap_sync_last_update_at"
+ t.integer "plan_id"
+ t.bigint "repository_size_limit"
+ t.string "saml_discovery_token"
+ t.integer "shared_runners_minutes_limit"
+ t.datetime_with_timezone "trial_ends_on"
+ t.integer "extra_shared_runners_minutes_limit"
+ t.string "ldap_sync_status", default: "ready", null: false
+ t.boolean "membership_lock", default: false
t.index ["created_at"], name: "index_namespaces_on_created_at", using: :btree
+ t.index ["custom_project_templates_group_id", "type"], name: "index_namespaces_on_custom_project_templates_group_id_and_type", where: "(custom_project_templates_group_id IS NOT NULL)", using: :btree
+ t.index ["file_template_project_id"], name: "index_namespaces_on_file_template_project_id", using: :btree
+ t.index ["ldap_sync_last_successful_update_at"], name: "index_namespaces_on_ldap_sync_last_successful_update_at", using: :btree
+ t.index ["ldap_sync_last_update_at"], name: "index_namespaces_on_ldap_sync_last_update_at", using: :btree
t.index ["name", "parent_id"], name: "index_namespaces_on_name_and_parent_id", unique: true, using: :btree
t.index ["name"], name: "index_namespaces_on_name_trigram", using: :gin, opclasses: {"name"=>"gin_trgm_ops"}
t.index ["owner_id"], name: "index_namespaces_on_owner_id", using: :btree
t.index ["parent_id", "id"], name: "index_namespaces_on_parent_id_and_id", unique: true, using: :btree
t.index ["path"], name: "index_namespaces_on_path", using: :btree
t.index ["path"], name: "index_namespaces_on_path_trigram", using: :gin, opclasses: {"path"=>"gin_trgm_ops"}
+ t.index ["plan_id"], name: "index_namespaces_on_plan_id", using: :btree
t.index ["require_two_factor_authentication"], name: "index_namespaces_on_require_two_factor_authentication", using: :btree
t.index ["runners_token"], name: "index_namespaces_on_runners_token", unique: true, using: :btree
t.index ["runners_token_encrypted"], name: "index_namespaces_on_runners_token_encrypted", unique: true, using: :btree
+ t.index ["shared_runners_minutes_limit", "extra_shared_runners_minutes_limit"], name: "index_namespaces_on_shared_and_extra_runners_minutes_limit", using: :btree
+ t.index ["trial_ends_on"], name: "index_namespaces_on_trial_ends_on", where: "(trial_ends_on IS NOT NULL)", using: :btree
t.index ["type"], name: "index_namespaces_on_type", using: :btree
end
@@ -1492,6 +2093,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.integer "cached_markdown_version"
t.text "change_position"
t.boolean "resolved_by_push"
+ t.bigint "review_id"
t.index ["author_id"], name: "index_notes_on_author_id", using: :btree
t.index ["commit_id"], name: "index_notes_on_commit_id", using: :btree
t.index ["created_at"], name: "index_notes_on_created_at", using: :btree
@@ -1501,6 +2103,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["noteable_id", "noteable_type"], name: "index_notes_on_noteable_id_and_noteable_type", using: :btree
t.index ["noteable_type"], name: "index_notes_on_noteable_type", using: :btree
t.index ["project_id", "noteable_type"], name: "index_notes_on_project_id_and_noteable_type", using: :btree
+ t.index ["review_id"], name: "index_notes_on_review_id", using: :btree
end
create_table "notification_settings", id: :serial, force: :cascade do |t|
@@ -1525,6 +2128,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.boolean "push_to_merge_request"
t.boolean "issue_due"
t.string "notification_email"
+ t.boolean "new_epic"
t.index ["source_id", "source_type"], name: "index_notification_settings_on_source_id_and_source_type", using: :btree
t.index ["user_id", "source_id", "source_type"], name: "index_notifications_on_user_id_and_source_id_and_source_type", unique: true, using: :btree
t.index ["user_id"], name: "index_notification_settings_on_user_id", using: :btree
@@ -1577,6 +2181,66 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["access_grant_id"], name: "index_oauth_openid_requests_on_access_grant_id", using: :btree
end
+ create_table "operations_feature_flag_scopes", force: :cascade do |t|
+ t.bigint "feature_flag_id", null: false
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.boolean "active", null: false
+ t.string "environment_scope", default: "*", null: false
+ t.index ["feature_flag_id", "environment_scope"], name: "index_feature_flag_scopes_on_flag_id_and_environment_scope", unique: true, using: :btree
+ end
+
+ create_table "operations_feature_flags", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.boolean "active", null: false
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.string "name", null: false
+ t.text "description"
+ t.index ["project_id", "name"], name: "index_operations_feature_flags_on_project_id_and_name", unique: true, using: :btree
+ end
+
+ create_table "operations_feature_flags_clients", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.string "token", null: false
+ t.index ["project_id", "token"], name: "index_operations_feature_flags_clients_on_project_id_and_token", unique: true, using: :btree
+ end
+
+ create_table "packages_maven_metadata", force: :cascade do |t|
+ t.bigint "package_id", null: false
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.string "app_group", null: false
+ t.string "app_name", null: false
+ t.string "app_version"
+ t.string "path", limit: 512, null: false
+ t.index ["package_id", "path"], name: "index_packages_maven_metadata_on_package_id_and_path", using: :btree
+ end
+
+ create_table "packages_package_files", force: :cascade do |t|
+ t.bigint "package_id", null: false
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.bigint "size"
+ t.integer "file_type"
+ t.integer "file_store"
+ t.binary "file_md5"
+ t.binary "file_sha1"
+ t.string "file_name", null: false
+ t.text "file", null: false
+ t.index ["package_id", "file_name"], name: "index_packages_package_files_on_package_id_and_file_name", using: :btree
+ end
+
+ create_table "packages_packages", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.string "name", null: false
+ t.string "version"
+ t.integer "package_type", limit: 2, null: false
+ t.index ["project_id"], name: "index_packages_packages_on_project_id", using: :btree
+ end
+
create_table "pages_domain_acme_orders", force: :cascade do |t|
t.integer "pages_domain_id", null: false
t.datetime_with_timezone "expires_at", null: false
@@ -1613,6 +2277,17 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["verified_at"], name: "index_pages_domains_on_verified_at", using: :btree
end
+ create_table "path_locks", id: :serial, force: :cascade do |t|
+ t.string "path", null: false
+ t.integer "project_id"
+ t.integer "user_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["path"], name: "index_path_locks_on_path", using: :btree
+ t.index ["project_id"], name: "index_path_locks_on_project_id", using: :btree
+ t.index ["user_id"], name: "index_path_locks_on_user_id", using: :btree
+ end
+
create_table "personal_access_tokens", id: :serial, force: :cascade do |t|
t.integer "user_id", null: false
t.string "name", null: false
@@ -1627,6 +2302,16 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["user_id"], name: "index_personal_access_tokens_on_user_id", using: :btree
end
+ create_table "plans", id: :serial, force: :cascade do |t|
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.string "name"
+ t.string "title"
+ t.integer "active_pipelines_limit"
+ t.integer "pipeline_size_limit"
+ t.index ["name"], name: "index_plans_on_name", using: :btree
+ end
+
create_table "pool_repositories", force: :cascade do |t|
t.integer "shard_id", null: false
t.string "disk_path"
@@ -1644,6 +2329,11 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["name"], name: "index_programming_languages_on_name", unique: true, using: :btree
end
+ create_table "project_alerting_settings", primary_key: "project_id", id: :integer, default: nil, force: :cascade do |t|
+ t.string "encrypted_token", null: false
+ t.string "encrypted_token_iv", null: false
+ end
+
create_table "project_authorizations", id: false, force: :cascade do |t|
t.integer "user_id", null: false
t.integer "project_id", null: false
@@ -1704,6 +2394,14 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.string "organization_name"
end
+ create_table "project_feature_usages", primary_key: "project_id", id: :integer, default: nil, force: :cascade do |t|
+ t.datetime "jira_dvcs_cloud_last_sync_at"
+ t.datetime "jira_dvcs_server_last_sync_at"
+ t.index ["jira_dvcs_cloud_last_sync_at", "project_id"], name: "idx_proj_feat_usg_on_jira_dvcs_cloud_last_sync_at_and_proj_id", where: "(jira_dvcs_cloud_last_sync_at IS NOT NULL)", using: :btree
+ t.index ["jira_dvcs_server_last_sync_at", "project_id"], name: "idx_proj_feat_usg_on_jira_dvcs_server_last_sync_at_and_proj_id", where: "(jira_dvcs_server_last_sync_at IS NOT NULL)", using: :btree
+ t.index ["project_id"], name: "index_project_feature_usages_on_project_id", using: :btree
+ end
+
create_table "project_features", id: :serial, force: :cascade do |t|
t.integer "project_id", null: false
t.integer "merge_requests_access_level"
@@ -1738,6 +2436,12 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["project_id"], name: "index_project_import_data_on_project_id", using: :btree
end
+ create_table "project_incident_management_settings", primary_key: "project_id", id: :integer, default: nil, force: :cascade do |t|
+ t.boolean "create_issue", default: false, null: false
+ t.boolean "send_email", default: true, null: false
+ t.text "issue_template_key"
+ end
+
create_table "project_metrics_settings", primary_key: "project_id", id: :integer, default: nil, force: :cascade do |t|
t.string "external_dashboard_url", null: false
end
@@ -1747,7 +2451,16 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.string "status"
t.string "jid"
t.text "last_error"
+ t.datetime_with_timezone "last_successful_update_at"
+ t.datetime_with_timezone "last_update_at"
+ t.datetime "last_update_scheduled_at"
+ t.datetime "last_update_started_at"
+ t.datetime "next_execution_timestamp"
+ t.integer "retry_count", default: 0, null: false
t.index ["jid"], name: "index_project_mirror_data_on_jid", using: :btree
+ t.index ["last_successful_update_at"], name: "index_project_mirror_data_on_last_successful_update_at", using: :btree
+ t.index ["last_update_at", "retry_count"], name: "index_project_mirror_data_on_last_update_at_and_retry_count", using: :btree
+ t.index ["next_execution_timestamp", "retry_count"], name: "index_mirror_data_on_next_execution_and_retry_count", using: :btree
t.index ["project_id"], name: "index_project_mirror_data_on_project_id", unique: true, using: :btree
t.index ["status"], name: "index_project_mirror_data_on_status", using: :btree
end
@@ -1761,6 +2474,26 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["shard_id"], name: "index_project_repositories_on_shard_id", using: :btree
end
+ create_table "project_repository_states", id: :serial, force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.binary "repository_verification_checksum"
+ t.binary "wiki_verification_checksum"
+ t.string "last_repository_verification_failure"
+ t.string "last_wiki_verification_failure"
+ t.datetime_with_timezone "repository_retry_at"
+ t.datetime_with_timezone "wiki_retry_at"
+ t.integer "repository_retry_count"
+ t.integer "wiki_retry_count"
+ t.datetime_with_timezone "last_repository_verification_ran_at"
+ t.datetime_with_timezone "last_wiki_verification_ran_at"
+ t.index ["last_repository_verification_failure"], name: "idx_repository_states_on_repository_failure_partial", where: "(last_repository_verification_failure IS NOT NULL)", using: :btree
+ t.index ["last_wiki_verification_failure"], name: "idx_repository_states_on_wiki_failure_partial", where: "(last_wiki_verification_failure IS NOT NULL)", using: :btree
+ t.index ["project_id", "last_repository_verification_ran_at"], name: "idx_repository_states_on_last_repository_verification_ran_at", where: "((repository_verification_checksum IS NOT NULL) AND (last_repository_verification_failure IS NULL))", using: :btree
+ t.index ["project_id", "last_wiki_verification_ran_at"], name: "idx_repository_states_on_last_wiki_verification_ran_at", where: "((wiki_verification_checksum IS NOT NULL) AND (last_wiki_verification_failure IS NULL))", using: :btree
+ t.index ["project_id"], name: "idx_repository_states_outdated_checksums", where: "(((repository_verification_checksum IS NULL) AND (last_repository_verification_failure IS NULL)) OR ((wiki_verification_checksum IS NULL) AND (last_wiki_verification_failure IS NULL)))", using: :btree
+ t.index ["project_id"], name: "index_project_repository_states_on_project_id", unique: true, using: :btree
+ end
+
create_table "project_statistics", id: :serial, force: :cascade do |t|
t.integer "project_id", null: false
t.integer "namespace_id", null: false
@@ -1771,10 +2504,20 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.bigint "build_artifacts_size", default: 0, null: false
t.bigint "packages_size", default: 0, null: false
t.bigint "wiki_size"
+ t.bigint "shared_runners_seconds", default: 0, null: false
+ t.datetime "shared_runners_seconds_last_reset"
t.index ["namespace_id"], name: "index_project_statistics_on_namespace_id", using: :btree
t.index ["project_id"], name: "index_project_statistics_on_project_id", unique: true, using: :btree
end
+ create_table "project_tracing_settings", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "project_id", null: false
+ t.string "external_url", null: false
+ t.index ["project_id"], name: "index_project_tracing_settings_on_project_id", unique: true, using: :btree
+ end
+
create_table "projects", id: :serial, force: :cascade do |t|
t.string "name"
t.string "path"
@@ -1822,7 +2565,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.boolean "resolve_outdated_diff_discussions"
t.boolean "repository_read_only"
t.boolean "merge_requests_ff_only_enabled", default: false
- t.boolean "merge_requests_rebase_enabled", default: false, null: false
+ t.boolean "merge_requests_rebase_enabled", default: false
t.integer "jobs_cache_index"
t.boolean "pages_https_only", default: true
t.boolean "remote_mirror_available_overridden"
@@ -1831,14 +2574,40 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.string "bfg_object_map"
t.boolean "detected_repository_languages"
t.string "external_authorization_classification_label"
+ t.boolean "disable_overriding_approvers_per_merge_request"
+ t.string "external_webhook_token"
+ t.text "issues_template"
+ t.boolean "merge_requests_author_approval"
+ t.boolean "merge_requests_disable_committers_approval"
+ t.boolean "merge_requests_require_code_owner_approval"
+ t.text "merge_requests_template"
+ t.datetime "mirror_last_successful_update_at"
+ t.datetime "mirror_last_update_at"
+ t.boolean "mirror_overwrites_diverged_branches"
+ t.integer "mirror_user_id"
+ t.boolean "only_mirror_protected_branches"
+ t.boolean "packages_enabled"
+ t.boolean "pull_mirror_available_overridden"
+ t.bigint "repository_size_limit"
+ t.boolean "require_password_to_approve"
+ t.boolean "mirror", default: false, null: false
+ t.boolean "mirror_trigger_builds", default: false, null: false
+ t.boolean "reset_approvals_on_push", default: true
+ t.boolean "service_desk_enabled", default: true
+ t.integer "approvals_before_merge", default: 0, null: false
+ t.index ["archived", "pending_delete", "merge_requests_require_code_owner_approval"], name: "projects_requiring_code_owner_approval", where: "((pending_delete = false) AND (archived = false) AND (merge_requests_require_code_owner_approval = true))", using: :btree
t.index ["created_at"], name: "index_projects_on_created_at", using: :btree
t.index ["creator_id"], name: "index_projects_on_creator_id", using: :btree
t.index ["description"], name: "index_projects_on_description_trigram", using: :gin, opclasses: {"description"=>"gin_trgm_ops"}
+ t.index ["id", "repository_storage", "last_repository_updated_at"], name: "idx_projects_on_repository_storage_last_repository_updated_at", using: :btree
t.index ["id"], name: "index_projects_on_id_partial_for_visibility", unique: true, where: "(visibility_level = ANY (ARRAY[10, 20]))", using: :btree
+ t.index ["id"], name: "index_projects_on_mirror_and_mirror_trigger_builds_both_true", where: "((mirror IS TRUE) AND (mirror_trigger_builds IS TRUE))", using: :btree
t.index ["last_activity_at"], name: "index_projects_on_last_activity_at", using: :btree
t.index ["last_repository_check_at"], name: "index_projects_on_last_repository_check_at", where: "(last_repository_check_at IS NOT NULL)", using: :btree
t.index ["last_repository_check_failed"], name: "index_projects_on_last_repository_check_failed", using: :btree
t.index ["last_repository_updated_at"], name: "index_projects_on_last_repository_updated_at", using: :btree
+ t.index ["mirror_last_successful_update_at"], name: "index_projects_on_mirror_last_successful_update_at", using: :btree
+ t.index ["mirror_user_id"], name: "index_projects_on_mirror_user_id", using: :btree
t.index ["name"], name: "index_projects_on_name_trigram", using: :gin, opclasses: {"name"=>"gin_trgm_ops"}
t.index ["namespace_id"], name: "index_projects_on_namespace_id", using: :btree
t.index ["path"], name: "index_projects_on_path", using: :btree
@@ -1853,6 +2622,30 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["visibility_level"], name: "index_projects_on_visibility_level", using: :btree
end
+ create_table "prometheus_alert_events", force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.integer "prometheus_alert_id", null: false
+ t.datetime_with_timezone "started_at", null: false
+ t.datetime_with_timezone "ended_at"
+ t.integer "status", limit: 2
+ t.string "payload_key"
+ t.index ["project_id", "status"], name: "index_prometheus_alert_events_on_project_id_and_status", using: :btree
+ t.index ["prometheus_alert_id", "payload_key"], name: "index_prometheus_alert_event_scoped_payload_key", unique: true, using: :btree
+ end
+
+ create_table "prometheus_alerts", id: :serial, force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.float "threshold", null: false
+ t.integer "operator", null: false
+ t.integer "environment_id", null: false
+ t.integer "project_id", null: false
+ t.integer "prometheus_metric_id", null: false
+ t.index ["environment_id"], name: "index_prometheus_alerts_on_environment_id", using: :btree
+ t.index ["project_id", "prometheus_metric_id", "environment_id"], name: "index_prometheus_alerts_metric_environment", unique: true, using: :btree
+ t.index ["prometheus_metric_id"], name: "index_prometheus_alerts_on_prometheus_metric_id", using: :btree
+ end
+
create_table "prometheus_metrics", id: :serial, force: :cascade do |t|
t.integer "project_id"
t.string "title", null: false
@@ -1873,18 +2666,36 @@ ActiveRecord::Schema.define(version: 20190611161641) do
create_table "protected_branch_merge_access_levels", id: :serial, force: :cascade do |t|
t.integer "protected_branch_id", null: false
- t.integer "access_level", default: 40, null: false
+ t.integer "access_level", default: 40
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.integer "group_id"
+ t.integer "user_id"
+ t.index ["group_id"], name: "index_protected_branch_merge_access_levels_on_group_id", using: :btree
t.index ["protected_branch_id"], name: "index_protected_branch_merge_access", using: :btree
+ t.index ["user_id"], name: "index_protected_branch_merge_access_levels_on_user_id", using: :btree
end
create_table "protected_branch_push_access_levels", id: :serial, force: :cascade do |t|
t.integer "protected_branch_id", null: false
- t.integer "access_level", default: 40, null: false
+ t.integer "access_level", default: 40
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.integer "group_id"
+ t.integer "user_id"
+ t.index ["group_id"], name: "index_protected_branch_push_access_levels_on_group_id", using: :btree
t.index ["protected_branch_id"], name: "index_protected_branch_push_access", using: :btree
+ t.index ["user_id"], name: "index_protected_branch_push_access_levels_on_user_id", using: :btree
+ end
+
+ create_table "protected_branch_unprotect_access_levels", id: :serial, force: :cascade do |t|
+ t.integer "protected_branch_id", null: false
+ t.integer "access_level", default: 40
+ t.integer "user_id"
+ t.integer "group_id"
+ t.index ["group_id"], name: "index_protected_branch_unprotect_access_levels_on_group_id", using: :btree
+ t.index ["protected_branch_id"], name: "index_protected_branch_unprotect_access", using: :btree
+ t.index ["user_id"], name: "index_protected_branch_unprotect_access_levels_on_user_id", using: :btree
end
create_table "protected_branches", id: :serial, force: :cascade do |t|
@@ -1895,6 +2706,27 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["project_id"], name: "index_protected_branches_on_project_id", using: :btree
end
+ create_table "protected_environment_deploy_access_levels", id: :serial, force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "access_level", default: 40
+ t.integer "protected_environment_id", null: false
+ t.integer "user_id"
+ t.integer "group_id"
+ t.index ["group_id"], name: "index_protected_environment_deploy_access_levels_on_group_id", using: :btree
+ t.index ["protected_environment_id"], name: "index_protected_environment_deploy_access", using: :btree
+ t.index ["user_id"], name: "index_protected_environment_deploy_access_levels_on_user_id", using: :btree
+ end
+
+ create_table "protected_environments", id: :serial, force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.string "name", null: false
+ t.index ["project_id", "name"], name: "index_protected_environments_on_project_id_and_name", unique: true, using: :btree
+ t.index ["project_id"], name: "index_protected_environments_on_project_id", using: :btree
+ end
+
create_table "protected_tag_create_access_levels", id: :serial, force: :cascade do |t|
t.integer "protected_tag_id", null: false
t.integer "access_level", default: 40
@@ -1928,6 +2760,29 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["event_id"], name: "index_push_event_payloads_on_event_id", unique: true, using: :btree
end
+ create_table "push_rules", id: :serial, force: :cascade do |t|
+ t.string "force_push_regex"
+ t.string "delete_branch_regex"
+ t.string "commit_message_regex"
+ t.boolean "deny_delete_tag"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "author_email_regex"
+ t.boolean "member_check", default: false, null: false
+ t.string "file_name_regex"
+ t.boolean "is_sample", default: false
+ t.integer "max_file_size", default: 0, null: false
+ t.boolean "prevent_secrets", default: false, null: false
+ t.string "branch_name_regex"
+ t.boolean "reject_unsigned_commits"
+ t.boolean "commit_committer_check"
+ t.boolean "regexp_uses_re2", default: true
+ t.string "commit_message_negative_regex"
+ t.index ["is_sample"], name: "index_push_rules_on_is_sample", where: "is_sample", using: :btree
+ t.index ["project_id"], name: "index_push_rules_on_project_id", using: :btree
+ end
+
create_table "redirect_routes", id: :serial, force: :cascade do |t|
t.integer "source_id", null: false
t.string "source_type", null: false
@@ -2002,12 +2857,24 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.integer "cached_markdown_version"
t.text "reference"
t.text "reference_html"
+ t.integer "epic_id"
+ t.index ["epic_id"], name: "index_resource_label_events_on_epic_id", using: :btree
t.index ["issue_id"], name: "index_resource_label_events_on_issue_id", using: :btree
t.index ["label_id"], name: "index_resource_label_events_on_label_id", using: :btree
t.index ["merge_request_id"], name: "index_resource_label_events_on_merge_request_id", using: :btree
t.index ["user_id"], name: "index_resource_label_events_on_user_id", using: :btree
end
+ create_table "reviews", force: :cascade do |t|
+ t.integer "author_id"
+ t.integer "merge_request_id", null: false
+ t.integer "project_id", null: false
+ t.datetime_with_timezone "created_at", null: false
+ t.index ["author_id"], name: "index_reviews_on_author_id", using: :btree
+ t.index ["merge_request_id"], name: "index_reviews_on_merge_request_id", using: :btree
+ t.index ["project_id"], name: "index_reviews_on_project_id", using: :btree
+ end
+
create_table "routes", id: :serial, force: :cascade do |t|
t.integer "source_id", null: false
t.string "source_type", null: false
@@ -2020,6 +2887,24 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["source_type", "source_id"], name: "index_routes_on_source_type_and_source_id", unique: true, using: :btree
end
+ create_table "saml_providers", id: :serial, force: :cascade do |t|
+ t.integer "group_id", null: false
+ t.boolean "enabled", null: false
+ t.string "certificate_fingerprint", null: false
+ t.string "sso_url", null: false
+ t.boolean "enforced_sso", default: false, null: false
+ t.boolean "enforced_group_managed_accounts", default: false, null: false
+ t.index ["group_id"], name: "index_saml_providers_on_group_id", using: :btree
+ end
+
+ create_table "scim_oauth_access_tokens", id: :serial, force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "group_id", null: false
+ t.string "token_encrypted", null: false
+ t.index ["group_id", "token_encrypted"], name: "index_scim_oauth_access_tokens_on_group_id_and_token_encrypted", unique: true, using: :btree
+ end
+
create_table "sent_notifications", id: :serial, force: :cascade do |t|
t.integer "project_id"
t.integer "noteable_id"
@@ -2067,6 +2952,26 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["name"], name: "index_shards_on_name", unique: true, using: :btree
end
+ create_table "slack_integrations", id: :serial, force: :cascade do |t|
+ t.integer "service_id", null: false
+ t.string "team_id", null: false
+ t.string "team_name", null: false
+ t.string "alias", null: false
+ t.string "user_id", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["service_id"], name: "index_slack_integrations_on_service_id", using: :btree
+ t.index ["team_id", "alias"], name: "index_slack_integrations_on_team_id_and_alias", unique: true, using: :btree
+ end
+
+ create_table "smartcard_identities", force: :cascade do |t|
+ t.integer "user_id", null: false
+ t.string "subject", null: false
+ t.string "issuer", null: false
+ t.index ["subject", "issuer"], name: "index_smartcard_identities_on_subject_and_issuer", unique: true, using: :btree
+ t.index ["user_id"], name: "index_smartcard_identities_on_user_id", using: :btree
+ end
+
create_table "snippets", id: :serial, force: :cascade do |t|
t.string "title"
t.text "content"
@@ -2090,6 +2995,19 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["visibility_level"], name: "index_snippets_on_visibility_level", using: :btree
end
+ create_table "software_license_policies", id: :serial, force: :cascade do |t|
+ t.integer "project_id", null: false
+ t.integer "software_license_id", null: false
+ t.integer "approval_status", default: 0, null: false
+ t.index ["project_id", "software_license_id"], name: "index_software_license_policies_unique_per_project", unique: true, using: :btree
+ t.index ["software_license_id"], name: "index_software_license_policies_on_software_license_id", using: :btree
+ end
+
+ create_table "software_licenses", id: :serial, force: :cascade do |t|
+ t.string "name", null: false
+ t.index ["name"], name: "index_software_licenses_on_name", using: :btree
+ end
+
create_table "spam_logs", id: :serial, force: :cascade do |t|
t.integer "user_id"
t.string "source_ip"
@@ -2289,6 +3207,10 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.string "timezone"
t.boolean "time_display_relative"
t.boolean "time_format_in_24h"
+ t.integer "epic_notes_filter", limit: 2, default: 0, null: false
+ t.string "epics_sort"
+ t.integer "roadmap_epics_state"
+ t.string "roadmaps_sort"
t.index ["user_id"], name: "index_user_preferences_on_user_id", unique: true, using: :btree
end
@@ -2378,24 +3300,48 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.boolean "private_profile"
t.boolean "include_private_contributions"
t.string "commit_email"
+ t.boolean "auditor", default: false, null: false
+ t.datetime "admin_email_unsubscribed_at"
+ t.boolean "email_opted_in"
+ t.datetime "email_opted_in_at"
+ t.string "email_opted_in_ip"
+ t.integer "email_opted_in_source_id"
+ t.integer "group_view"
+ t.integer "managing_group_id"
+ t.text "note"
+ t.integer "roadmap_layout", limit: 2
+ t.integer "bot_type", limit: 2
t.index ["accepted_term_id"], name: "index_users_on_accepted_term_id", using: :btree
t.index ["admin"], name: "index_users_on_admin", using: :btree
+ t.index ["bot_type"], name: "index_users_on_bot_type", using: :btree
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
t.index ["created_at"], name: "index_users_on_created_at", using: :btree
t.index ["email"], name: "index_users_on_email", unique: true, using: :btree
t.index ["email"], name: "index_users_on_email_trigram", using: :gin, opclasses: {"email"=>"gin_trgm_ops"}
t.index ["feed_token"], name: "index_users_on_feed_token", using: :btree
t.index ["ghost"], name: "index_users_on_ghost", using: :btree
+ t.index ["group_view"], name: "index_users_on_group_view", using: :btree
t.index ["incoming_email_token"], name: "index_users_on_incoming_email_token", using: :btree
+ t.index ["managing_group_id"], name: "index_users_on_managing_group_id", using: :btree
t.index ["name"], name: "index_users_on_name", using: :btree
t.index ["name"], name: "index_users_on_name_trigram", using: :gin, opclasses: {"name"=>"gin_trgm_ops"}
t.index ["public_email"], name: "index_users_on_public_email", where: "((public_email)::text <> ''::text)", using: :btree
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
t.index ["state"], name: "index_users_on_state", using: :btree
+ t.index ["state"], name: "index_users_on_state_and_internal", where: "((ghost <> true) AND (bot_type IS NULL))", using: :btree
t.index ["username"], name: "index_users_on_username", using: :btree
t.index ["username"], name: "index_users_on_username_trigram", using: :gin, opclasses: {"username"=>"gin_trgm_ops"}
end
+ create_table "users_ops_dashboard_projects", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "user_id", null: false
+ t.integer "project_id", null: false
+ t.index ["project_id"], name: "index_users_ops_dashboard_projects_on_project_id", using: :btree
+ t.index ["user_id", "project_id"], name: "index_users_ops_dashboard_projects_on_user_id_and_project_id", unique: true, using: :btree
+ end
+
create_table "users_star_projects", id: :serial, force: :cascade do |t|
t.integer "project_id", null: false
t.integer "user_id", null: false
@@ -2405,6 +3351,88 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.index ["user_id", "project_id"], name: "index_users_star_projects_on_user_id_and_project_id", unique: true, using: :btree
end
+ create_table "vulnerability_feedback", id: :serial, force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "feedback_type", limit: 2, null: false
+ t.integer "category", limit: 2, null: false
+ t.integer "project_id", null: false
+ t.integer "author_id", null: false
+ t.integer "pipeline_id"
+ t.integer "issue_id"
+ t.string "project_fingerprint", limit: 40, null: false
+ t.integer "merge_request_id"
+ t.integer "comment_author_id"
+ t.text "comment"
+ t.datetime_with_timezone "comment_timestamp"
+ t.index ["author_id"], name: "index_vulnerability_feedback_on_author_id", using: :btree
+ t.index ["comment_author_id"], name: "index_vulnerability_feedback_on_comment_author_id", using: :btree
+ t.index ["issue_id"], name: "index_vulnerability_feedback_on_issue_id", using: :btree
+ t.index ["merge_request_id"], name: "index_vulnerability_feedback_on_merge_request_id", using: :btree
+ t.index ["pipeline_id"], name: "index_vulnerability_feedback_on_pipeline_id", using: :btree
+ t.index ["project_id", "category", "feedback_type", "project_fingerprint"], name: "vulnerability_feedback_unique_idx", unique: true, using: :btree
+ end
+
+ create_table "vulnerability_identifiers", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "project_id", null: false
+ t.binary "fingerprint", null: false
+ t.string "external_type", null: false
+ t.string "external_id", null: false
+ t.string "name", null: false
+ t.text "url"
+ t.index ["project_id", "fingerprint"], name: "index_vulnerability_identifiers_on_project_id_and_fingerprint", unique: true, using: :btree
+ end
+
+ create_table "vulnerability_occurrence_identifiers", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.bigint "occurrence_id", null: false
+ t.bigint "identifier_id", null: false
+ t.index ["identifier_id"], name: "index_vulnerability_occurrence_identifiers_on_identifier_id", using: :btree
+ t.index ["occurrence_id", "identifier_id"], name: "index_vulnerability_occurrence_identifiers_on_unique_keys", unique: true, using: :btree
+ end
+
+ create_table "vulnerability_occurrence_pipelines", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.bigint "occurrence_id", null: false
+ t.integer "pipeline_id", null: false
+ t.index ["occurrence_id", "pipeline_id"], name: "vulnerability_occurrence_pipelines_on_unique_keys", unique: true, using: :btree
+ t.index ["pipeline_id"], name: "index_vulnerability_occurrence_pipelines_on_pipeline_id", using: :btree
+ end
+
+ create_table "vulnerability_occurrences", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "severity", limit: 2, null: false
+ t.integer "confidence", limit: 2, null: false
+ t.integer "report_type", limit: 2, null: false
+ t.integer "project_id", null: false
+ t.bigint "scanner_id", null: false
+ t.bigint "primary_identifier_id", null: false
+ t.binary "project_fingerprint", null: false
+ t.binary "location_fingerprint", null: false
+ t.string "uuid", limit: 36, null: false
+ t.string "name", null: false
+ t.string "metadata_version", null: false
+ t.text "raw_metadata", null: false
+ t.index ["primary_identifier_id"], name: "index_vulnerability_occurrences_on_primary_identifier_id", using: :btree
+ t.index ["project_id", "primary_identifier_id", "location_fingerprint", "scanner_id"], name: "index_vulnerability_occurrences_on_unique_keys", unique: true, using: :btree
+ t.index ["scanner_id"], name: "index_vulnerability_occurrences_on_scanner_id", using: :btree
+ t.index ["uuid"], name: "index_vulnerability_occurrences_on_uuid", unique: true, using: :btree
+ end
+
+ create_table "vulnerability_scanners", force: :cascade do |t|
+ t.datetime_with_timezone "created_at", null: false
+ t.datetime_with_timezone "updated_at", null: false
+ t.integer "project_id", null: false
+ t.string "external_id", null: false
+ t.string "name", null: false
+ t.index ["project_id", "external_id"], name: "index_vulnerability_scanners_on_project_id_and_external_id", unique: true, using: :btree
+ end
+
create_table "web_hook_logs", id: :serial, force: :cascade do |t|
t.integer "web_hook_id", null: false
t.string "trigger"
@@ -2445,16 +3473,39 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.string "encrypted_token_iv"
t.string "encrypted_url"
t.string "encrypted_url_iv"
+ t.integer "group_id"
t.index ["project_id"], name: "index_web_hooks_on_project_id", using: :btree
t.index ["type"], name: "index_web_hooks_on_type", using: :btree
end
+ add_foreign_key "application_settings", "namespaces", column: "custom_project_templates_group_id", on_delete: :nullify
+ add_foreign_key "application_settings", "projects", column: "file_template_project_id", name: "fk_ec757bd087", on_delete: :nullify
add_foreign_key "application_settings", "users", column: "usage_stats_set_by_user_id", name: "fk_964370041d", on_delete: :nullify
+ add_foreign_key "approval_merge_request_rule_sources", "approval_merge_request_rules", on_delete: :cascade
+ add_foreign_key "approval_merge_request_rule_sources", "approval_project_rules", on_delete: :cascade
+ add_foreign_key "approval_merge_request_rules", "merge_requests", on_delete: :cascade
+ add_foreign_key "approval_merge_request_rules_approved_approvers", "approval_merge_request_rules", on_delete: :cascade
+ add_foreign_key "approval_merge_request_rules_approved_approvers", "users", on_delete: :cascade
+ add_foreign_key "approval_merge_request_rules_groups", "approval_merge_request_rules", on_delete: :cascade
+ add_foreign_key "approval_merge_request_rules_groups", "namespaces", column: "group_id", on_delete: :cascade
+ add_foreign_key "approval_merge_request_rules_users", "approval_merge_request_rules", on_delete: :cascade
+ add_foreign_key "approval_merge_request_rules_users", "users", on_delete: :cascade
+ add_foreign_key "approval_project_rules", "projects", on_delete: :cascade
+ add_foreign_key "approval_project_rules_groups", "approval_project_rules", on_delete: :cascade
+ add_foreign_key "approval_project_rules_groups", "namespaces", column: "group_id", on_delete: :cascade
+ add_foreign_key "approval_project_rules_users", "approval_project_rules", on_delete: :cascade
+ add_foreign_key "approval_project_rules_users", "users", on_delete: :cascade
+ add_foreign_key "approvals", "merge_requests", name: "fk_310d714958", on_delete: :cascade
+ add_foreign_key "approver_groups", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "badges", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "badges", "projects", on_delete: :cascade
+ add_foreign_key "board_assignees", "boards", on_delete: :cascade
+ add_foreign_key "board_assignees", "users", column: "assignee_id", on_delete: :cascade
add_foreign_key "board_group_recent_visits", "boards", on_delete: :cascade
add_foreign_key "board_group_recent_visits", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "board_group_recent_visits", "users", on_delete: :cascade
+ add_foreign_key "board_labels", "boards", on_delete: :cascade
+ add_foreign_key "board_labels", "labels", on_delete: :cascade
add_foreign_key "board_project_recent_visits", "boards", on_delete: :cascade
add_foreign_key "board_project_recent_visits", "projects", on_delete: :cascade
add_foreign_key "board_project_recent_visits", "users", on_delete: :cascade
@@ -2468,6 +3519,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
add_foreign_key "ci_build_trace_sections", "projects", on_delete: :cascade
add_foreign_key "ci_builds", "ci_pipelines", column: "auto_canceled_by_id", name: "fk_a2141b1522", on_delete: :nullify
add_foreign_key "ci_builds", "ci_pipelines", column: "commit_id", name: "fk_d3130c9a7f", on_delete: :cascade
+ add_foreign_key "ci_builds", "ci_pipelines", column: "upstream_pipeline_id", name: "fk_87f4cefcda", on_delete: :cascade
add_foreign_key "ci_builds", "ci_stages", column: "stage_id", name: "fk_3a9eaa254d", on_delete: :cascade
add_foreign_key "ci_builds", "projects", name: "fk_befce0568a", on_delete: :cascade
add_foreign_key "ci_builds_metadata", "ci_builds", column: "build_id", on_delete: :cascade
@@ -2489,6 +3541,11 @@ ActiveRecord::Schema.define(version: 20190611161641) do
add_foreign_key "ci_runner_namespaces", "ci_runners", column: "runner_id", on_delete: :cascade
add_foreign_key "ci_runner_namespaces", "namespaces", on_delete: :cascade
add_foreign_key "ci_runner_projects", "projects", name: "fk_4478a6f1e4", on_delete: :cascade
+ add_foreign_key "ci_sources_pipelines", "ci_builds", column: "source_job_id", name: "fk_be5624bf37", on_delete: :cascade
+ add_foreign_key "ci_sources_pipelines", "ci_pipelines", column: "pipeline_id", name: "fk_e1bad85861", on_delete: :cascade
+ add_foreign_key "ci_sources_pipelines", "ci_pipelines", column: "source_pipeline_id", name: "fk_d4e29af7d7", on_delete: :cascade
+ add_foreign_key "ci_sources_pipelines", "projects", column: "source_project_id", name: "fk_acd9737679", on_delete: :cascade
+ add_foreign_key "ci_sources_pipelines", "projects", name: "fk_1e53c97c0a", on_delete: :cascade
add_foreign_key "ci_stages", "ci_pipelines", column: "pipeline_id", name: "fk_fb57e6cc56", on_delete: :cascade
add_foreign_key "ci_stages", "projects", name: "fk_2360681d1d", on_delete: :cascade
add_foreign_key "ci_trigger_requests", "ci_triggers", column: "trigger_id", name: "fk_b8ec8b7245", on_delete: :cascade
@@ -2515,9 +3572,28 @@ ActiveRecord::Schema.define(version: 20190611161641) do
add_foreign_key "clusters_kubernetes_namespaces", "clusters", on_delete: :cascade
add_foreign_key "clusters_kubernetes_namespaces", "projects", on_delete: :nullify
add_foreign_key "container_repositories", "projects"
+ add_foreign_key "dependency_proxy_blobs", "namespaces", column: "group_id", name: "fk_db58bbc5d7", on_delete: :cascade
+ add_foreign_key "dependency_proxy_group_settings", "namespaces", column: "group_id", name: "fk_616ddd680a", on_delete: :cascade
add_foreign_key "deploy_keys_projects", "projects", name: "fk_58a901ca7e", on_delete: :cascade
add_foreign_key "deployments", "projects", name: "fk_b9a3851b82", on_delete: :cascade
+ add_foreign_key "design_management_designs", "issues", on_delete: :cascade
+ add_foreign_key "design_management_designs", "projects", on_delete: :cascade
+ add_foreign_key "design_management_designs_versions", "design_management_designs", column: "design_id", name: "fk_03c671965c", on_delete: :cascade
+ add_foreign_key "design_management_designs_versions", "design_management_versions", column: "version_id", name: "fk_f4d25ba00c", on_delete: :cascade
+ add_foreign_key "draft_notes", "merge_requests", on_delete: :cascade
+ add_foreign_key "draft_notes", "users", column: "author_id", on_delete: :cascade
+ add_foreign_key "elasticsearch_indexed_namespaces", "namespaces", on_delete: :cascade
+ add_foreign_key "elasticsearch_indexed_projects", "projects", on_delete: :cascade
add_foreign_key "environments", "projects", name: "fk_d1c8c1da6a", on_delete: :cascade
+ add_foreign_key "epic_issues", "epics", on_delete: :cascade
+ add_foreign_key "epic_issues", "issues", on_delete: :cascade
+ add_foreign_key "epic_metrics", "epics", on_delete: :cascade
+ add_foreign_key "epics", "epics", column: "parent_id", name: "fk_25b99c1be3", on_delete: :cascade
+ add_foreign_key "epics", "milestones", on_delete: :nullify
+ add_foreign_key "epics", "namespaces", column: "group_id", name: "fk_f081aa4489", on_delete: :cascade
+ add_foreign_key "epics", "users", column: "assignee_id", name: "fk_dccd3f98fc", on_delete: :nullify
+ add_foreign_key "epics", "users", column: "author_id", name: "fk_3654b61b03", on_delete: :cascade
+ add_foreign_key "epics", "users", column: "closed_by_id", name: "fk_aa5798e761", on_delete: :nullify
add_foreign_key "events", "projects", on_delete: :cascade
add_foreign_key "events", "users", column: "author_id", name: "fk_edfd187b6f", on_delete: :cascade
add_foreign_key "fork_network_members", "fork_networks", on_delete: :cascade
@@ -2525,17 +3601,46 @@ ActiveRecord::Schema.define(version: 20190611161641) do
add_foreign_key "fork_network_members", "projects", on_delete: :cascade
add_foreign_key "fork_networks", "projects", column: "root_project_id", name: "fk_e7b436b2b5", on_delete: :nullify
add_foreign_key "forked_project_links", "projects", column: "forked_to_project_id", name: "fk_434510edb0", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_cache_invalidation_events", column: "cache_invalidation_event_id", name: "fk_42c3b54bed", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_hashed_storage_migrated_events", column: "hashed_storage_migrated_event_id", name: "fk_27548c6db3", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_job_artifact_deleted_events", column: "job_artifact_deleted_event_id", name: "fk_176d3fbb5d", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_lfs_object_deleted_events", column: "lfs_object_deleted_event_id", name: "fk_d5af95fcd9", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_repositories_changed_events", column: "repositories_changed_event_id", name: "fk_4a99ebfd60", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_repository_created_events", column: "repository_created_event_id", name: "fk_9b9afb1916", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_repository_deleted_events", column: "repository_deleted_event_id", name: "fk_c4b1c1f66e", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_repository_renamed_events", column: "repository_renamed_event_id", name: "fk_86c84214ec", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_repository_updated_events", column: "repository_updated_event_id", name: "fk_78a6492f68", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_reset_checksum_events", column: "reset_checksum_event_id", name: "fk_cff7185ad2", on_delete: :cascade
+ add_foreign_key "geo_event_log", "geo_upload_deleted_events", column: "upload_deleted_event_id", name: "fk_c1f241c70d", on_delete: :cascade
+ add_foreign_key "geo_hashed_storage_attachments_events", "projects", on_delete: :cascade
+ add_foreign_key "geo_hashed_storage_migrated_events", "projects", on_delete: :cascade
+ add_foreign_key "geo_node_namespace_links", "geo_nodes", on_delete: :cascade
+ add_foreign_key "geo_node_namespace_links", "namespaces", on_delete: :cascade
+ add_foreign_key "geo_node_statuses", "geo_nodes", on_delete: :cascade
+ add_foreign_key "geo_repositories_changed_events", "geo_nodes", on_delete: :cascade
+ add_foreign_key "geo_repository_created_events", "projects", on_delete: :cascade
+ add_foreign_key "geo_repository_renamed_events", "projects", on_delete: :cascade
+ add_foreign_key "geo_repository_updated_events", "projects", on_delete: :cascade
+ add_foreign_key "geo_reset_checksum_events", "projects", on_delete: :cascade
+ add_foreign_key "gitlab_subscriptions", "namespaces", name: "fk_e2595d00a1", on_delete: :cascade
+ add_foreign_key "gitlab_subscriptions", "plans", column: "hosted_plan_id", name: "fk_bd0c4019c3", on_delete: :cascade
add_foreign_key "gpg_key_subkeys", "gpg_keys", on_delete: :cascade
add_foreign_key "gpg_keys", "users", on_delete: :cascade
add_foreign_key "gpg_signatures", "gpg_key_subkeys", on_delete: :nullify
add_foreign_key "gpg_signatures", "gpg_keys", on_delete: :nullify
add_foreign_key "gpg_signatures", "projects", on_delete: :cascade
add_foreign_key "group_custom_attributes", "namespaces", column: "group_id", on_delete: :cascade
+ add_foreign_key "identities", "saml_providers", name: "fk_aade90f0fc", on_delete: :cascade
add_foreign_key "import_export_uploads", "projects", on_delete: :cascade
+ add_foreign_key "index_statuses", "projects", name: "fk_74b2492545", on_delete: :cascade
+ add_foreign_key "insights", "namespaces", on_delete: :cascade
+ add_foreign_key "insights", "projects", on_delete: :cascade
add_foreign_key "internal_ids", "namespaces", name: "fk_162941d509", on_delete: :cascade
add_foreign_key "internal_ids", "projects", on_delete: :cascade
add_foreign_key "issue_assignees", "issues", name: "fk_b7d881734a", on_delete: :cascade
add_foreign_key "issue_assignees", "users", name: "fk_5e0c8d9154", on_delete: :cascade
+ add_foreign_key "issue_links", "issues", column: "source_id", name: "fk_c900194ff2", on_delete: :cascade
+ add_foreign_key "issue_links", "issues", column: "target_id", name: "fk_e71bb44f1f", on_delete: :cascade
add_foreign_key "issue_metrics", "issues", on_delete: :cascade
add_foreign_key "issues", "issues", column: "moved_to_id", name: "fk_a194299be1", on_delete: :nullify
add_foreign_key "issues", "milestones", name: "fk_96b1dd429c", on_delete: :nullify
@@ -2552,6 +3657,8 @@ ActiveRecord::Schema.define(version: 20190611161641) do
add_foreign_key "lfs_file_locks", "users", on_delete: :cascade
add_foreign_key "lists", "boards", name: "fk_0d3f677137", on_delete: :cascade
add_foreign_key "lists", "labels", name: "fk_7a5553d60f", on_delete: :cascade
+ add_foreign_key "lists", "milestones", on_delete: :cascade
+ add_foreign_key "lists", "users", name: "fk_d6cf4279f7", on_delete: :cascade
add_foreign_key "members", "users", name: "fk_2e88fb7ce9", on_delete: :cascade
add_foreign_key "merge_request_assignees", "merge_requests", on_delete: :cascade
add_foreign_key "merge_request_assignees", "users", on_delete: :cascade
@@ -2581,15 +3688,29 @@ ActiveRecord::Schema.define(version: 20190611161641) do
add_foreign_key "merge_trains", "users", on_delete: :cascade
add_foreign_key "milestones", "namespaces", column: "group_id", name: "fk_95650a40d4", on_delete: :cascade
add_foreign_key "milestones", "projects", name: "fk_9bd0a0c791", on_delete: :cascade
+ add_foreign_key "namespace_statistics", "namespaces", on_delete: :cascade
+ add_foreign_key "namespaces", "namespaces", column: "custom_project_templates_group_id", name: "fk_e7a0b20a6b", on_delete: :nullify
+ add_foreign_key "namespaces", "plans", name: "fk_fdd12e5b80", on_delete: :nullify
+ add_foreign_key "namespaces", "projects", column: "file_template_project_id", name: "fk_319256d87a", on_delete: :nullify
add_foreign_key "note_diff_files", "notes", column: "diff_note_id", on_delete: :cascade
add_foreign_key "notes", "projects", name: "fk_99e097b079", on_delete: :cascade
+ add_foreign_key "notes", "reviews", name: "fk_2e82291620", on_delete: :nullify
add_foreign_key "notification_settings", "users", name: "fk_0c95e91db7", on_delete: :cascade
add_foreign_key "oauth_openid_requests", "oauth_access_grants", column: "access_grant_id", name: "fk_oauth_openid_requests_oauth_access_grants_access_grant_id"
+ add_foreign_key "operations_feature_flag_scopes", "operations_feature_flags", column: "feature_flag_id", on_delete: :cascade
+ add_foreign_key "operations_feature_flags", "projects", on_delete: :cascade
+ add_foreign_key "operations_feature_flags_clients", "projects", on_delete: :cascade
+ add_foreign_key "packages_maven_metadata", "packages_packages", column: "package_id", name: "fk_be88aed360", on_delete: :cascade
+ add_foreign_key "packages_package_files", "packages_packages", column: "package_id", name: "fk_86f0f182f8", on_delete: :cascade
+ add_foreign_key "packages_packages", "projects", on_delete: :cascade
add_foreign_key "pages_domain_acme_orders", "pages_domains", on_delete: :cascade
add_foreign_key "pages_domains", "projects", name: "fk_ea2f6dfc6f", on_delete: :cascade
+ add_foreign_key "path_locks", "projects", name: "fk_5265c98f24", on_delete: :cascade
+ add_foreign_key "path_locks", "users"
add_foreign_key "personal_access_tokens", "users"
add_foreign_key "pool_repositories", "projects", column: "source_project_id", on_delete: :nullify
add_foreign_key "pool_repositories", "shards", on_delete: :restrict
+ add_foreign_key "project_alerting_settings", "projects", on_delete: :cascade
add_foreign_key "project_authorizations", "projects", on_delete: :cascade
add_foreign_key "project_authorizations", "users", on_delete: :cascade
add_foreign_key "project_auto_devops", "projects", on_delete: :cascade
@@ -2599,35 +3720,66 @@ ActiveRecord::Schema.define(version: 20190611161641) do
add_foreign_key "project_deploy_tokens", "deploy_tokens", on_delete: :cascade
add_foreign_key "project_deploy_tokens", "projects", on_delete: :cascade
add_foreign_key "project_error_tracking_settings", "projects", on_delete: :cascade
+ add_foreign_key "project_feature_usages", "projects", on_delete: :cascade
add_foreign_key "project_features", "projects", name: "fk_18513d9b92", on_delete: :cascade
add_foreign_key "project_group_links", "projects", name: "fk_daa8cee94c", on_delete: :cascade
add_foreign_key "project_import_data", "projects", name: "fk_ffb9ee3a10", on_delete: :cascade
+ add_foreign_key "project_incident_management_settings", "projects", on_delete: :cascade
add_foreign_key "project_metrics_settings", "projects", on_delete: :cascade
add_foreign_key "project_mirror_data", "projects", on_delete: :cascade
add_foreign_key "project_repositories", "projects", on_delete: :cascade
add_foreign_key "project_repositories", "shards", on_delete: :restrict
+ add_foreign_key "project_repository_states", "projects", on_delete: :cascade
add_foreign_key "project_statistics", "projects", on_delete: :cascade
+ add_foreign_key "project_tracing_settings", "projects", on_delete: :cascade
add_foreign_key "projects", "pool_repositories", name: "fk_6e5c14658a", on_delete: :nullify
+ add_foreign_key "prometheus_alert_events", "projects", on_delete: :cascade
+ add_foreign_key "prometheus_alert_events", "prometheus_alerts", on_delete: :cascade
+ add_foreign_key "prometheus_alerts", "environments", on_delete: :cascade
+ add_foreign_key "prometheus_alerts", "projects", on_delete: :cascade
+ add_foreign_key "prometheus_alerts", "prometheus_metrics", on_delete: :cascade
add_foreign_key "prometheus_metrics", "projects", on_delete: :cascade
+ add_foreign_key "protected_branch_merge_access_levels", "namespaces", column: "group_id", name: "fk_98f3d044fe", on_delete: :cascade
add_foreign_key "protected_branch_merge_access_levels", "protected_branches", name: "fk_8a3072ccb3", on_delete: :cascade
+ add_foreign_key "protected_branch_merge_access_levels", "users"
+ add_foreign_key "protected_branch_push_access_levels", "namespaces", column: "group_id", name: "fk_7111b68cdb", on_delete: :cascade
add_foreign_key "protected_branch_push_access_levels", "protected_branches", name: "fk_9ffc86a3d9", on_delete: :cascade
+ add_foreign_key "protected_branch_push_access_levels", "users"
+ add_foreign_key "protected_branch_unprotect_access_levels", "namespaces", column: "group_id", on_delete: :cascade
+ add_foreign_key "protected_branch_unprotect_access_levels", "protected_branches", on_delete: :cascade
+ add_foreign_key "protected_branch_unprotect_access_levels", "users", on_delete: :cascade
add_foreign_key "protected_branches", "projects", name: "fk_7a9c6d93e7", on_delete: :cascade
- add_foreign_key "protected_tag_create_access_levels", "namespaces", column: "group_id"
+ add_foreign_key "protected_environment_deploy_access_levels", "namespaces", column: "group_id", on_delete: :cascade
+ add_foreign_key "protected_environment_deploy_access_levels", "protected_environments", on_delete: :cascade
+ add_foreign_key "protected_environment_deploy_access_levels", "users", on_delete: :cascade
+ add_foreign_key "protected_environments", "projects", on_delete: :cascade
+ add_foreign_key "protected_tag_create_access_levels", "namespaces", column: "group_id", name: "fk_b4eb82fe3c", on_delete: :cascade
add_foreign_key "protected_tag_create_access_levels", "protected_tags", name: "fk_f7dfda8c51", on_delete: :cascade
add_foreign_key "protected_tag_create_access_levels", "users"
add_foreign_key "protected_tags", "projects", name: "fk_8e4af87648", on_delete: :cascade
add_foreign_key "push_event_payloads", "events", name: "fk_36c74129da", on_delete: :cascade
+ add_foreign_key "push_rules", "projects", name: "fk_83b29894de", on_delete: :cascade
add_foreign_key "release_links", "releases", on_delete: :cascade
add_foreign_key "releases", "projects", name: "fk_47fe2a0596", on_delete: :cascade
add_foreign_key "releases", "users", column: "author_id", name: "fk_8e4456f90f", on_delete: :nullify
add_foreign_key "remote_mirrors", "projects", on_delete: :cascade
add_foreign_key "repository_languages", "projects", on_delete: :cascade
+ add_foreign_key "resource_label_events", "epics", on_delete: :cascade
add_foreign_key "resource_label_events", "issues", on_delete: :cascade
add_foreign_key "resource_label_events", "labels", on_delete: :nullify
add_foreign_key "resource_label_events", "merge_requests", on_delete: :cascade
add_foreign_key "resource_label_events", "users", on_delete: :nullify
+ add_foreign_key "reviews", "merge_requests", on_delete: :cascade
+ add_foreign_key "reviews", "projects", on_delete: :cascade
+ add_foreign_key "reviews", "users", column: "author_id", on_delete: :nullify
+ add_foreign_key "saml_providers", "namespaces", column: "group_id", on_delete: :cascade
+ add_foreign_key "scim_oauth_access_tokens", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "services", "projects", name: "fk_71cce407f9", on_delete: :cascade
+ add_foreign_key "slack_integrations", "services", on_delete: :cascade
+ add_foreign_key "smartcard_identities", "users", on_delete: :cascade
add_foreign_key "snippets", "projects", name: "fk_be41fd4bb7", on_delete: :cascade
+ add_foreign_key "software_license_policies", "projects", on_delete: :cascade
+ add_foreign_key "software_license_policies", "software_licenses", on_delete: :cascade
add_foreign_key "subscriptions", "projects", on_delete: :cascade
add_foreign_key "suggestions", "notes", on_delete: :cascade
add_foreign_key "system_note_metadata", "notes", name: "fk_d83a918cb1", on_delete: :cascade
@@ -2650,7 +3802,25 @@ ActiveRecord::Schema.define(version: 20190611161641) do
add_foreign_key "user_statuses", "users", on_delete: :cascade
add_foreign_key "user_synced_attributes_metadata", "users", on_delete: :cascade
add_foreign_key "users", "application_setting_terms", column: "accepted_term_id", name: "fk_789cd90b35", on_delete: :cascade
+ add_foreign_key "users", "namespaces", column: "managing_group_id", name: "fk_a4b8fefe3e", on_delete: :nullify
+ add_foreign_key "users_ops_dashboard_projects", "projects", on_delete: :cascade
+ add_foreign_key "users_ops_dashboard_projects", "users", on_delete: :cascade
add_foreign_key "users_star_projects", "projects", name: "fk_22cd27ddfc", on_delete: :cascade
+ add_foreign_key "vulnerability_feedback", "ci_pipelines", column: "pipeline_id", on_delete: :nullify
+ add_foreign_key "vulnerability_feedback", "issues", on_delete: :nullify
+ add_foreign_key "vulnerability_feedback", "merge_requests", name: "fk_563ff1912e", on_delete: :nullify
+ add_foreign_key "vulnerability_feedback", "projects", on_delete: :cascade
+ add_foreign_key "vulnerability_feedback", "users", column: "author_id", on_delete: :cascade
+ add_foreign_key "vulnerability_feedback", "users", column: "comment_author_id", name: "fk_94f7c8a81e", on_delete: :nullify
+ add_foreign_key "vulnerability_identifiers", "projects", on_delete: :cascade
+ add_foreign_key "vulnerability_occurrence_identifiers", "vulnerability_identifiers", column: "identifier_id", on_delete: :cascade
+ add_foreign_key "vulnerability_occurrence_identifiers", "vulnerability_occurrences", column: "occurrence_id", on_delete: :cascade
+ add_foreign_key "vulnerability_occurrence_pipelines", "ci_pipelines", column: "pipeline_id", on_delete: :cascade
+ add_foreign_key "vulnerability_occurrence_pipelines", "vulnerability_occurrences", column: "occurrence_id", on_delete: :cascade
+ add_foreign_key "vulnerability_occurrences", "projects", on_delete: :cascade
+ add_foreign_key "vulnerability_occurrences", "vulnerability_identifiers", column: "primary_identifier_id", on_delete: :cascade
+ add_foreign_key "vulnerability_occurrences", "vulnerability_scanners", column: "scanner_id", on_delete: :cascade
+ add_foreign_key "vulnerability_scanners", "projects", on_delete: :cascade
add_foreign_key "web_hook_logs", "web_hooks", on_delete: :cascade
add_foreign_key "web_hooks", "projects", name: "fk_0c8ca6d9d1", on_delete: :cascade
end