diff options
Diffstat (limited to 'db/schema.rb')
-rw-r--r-- | db/schema.rb | 134 |
1 files changed, 94 insertions, 40 deletions
diff --git a/db/schema.rb b/db/schema.rb index ffa165c3444..74634d14ccb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170807160457) do +ActiveRecord::Schema.define(version: 20170905112933) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -28,12 +28,12 @@ ActiveRecord::Schema.define(version: 20170807160457) do end create_table "appearances", force: :cascade do |t| - t.string "title" - t.text "description" + t.string "title", null: false + t.text "description", null: false t.string "header_logo" t.string "logo" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false t.text "description_html" t.integer "cached_markdown_version" end @@ -101,6 +101,10 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.text "help_page_text_html" t.text "shared_runners_text_html" t.text "after_sign_up_text_html" + t.integer "rsa_key_restriction", default: 0, null: false + t.integer "dsa_key_restriction", default: 0, null: false + t.integer "ecdsa_key_restriction", default: 0, null: false + t.integer "ed25519_key_restriction", default: 0, null: false t.boolean "housekeeping_enabled", default: true, null: false t.boolean "housekeeping_bitmaps_enabled", default: true, null: false t.integer "housekeeping_incremental_repack_period", default: 10, null: false @@ -125,8 +129,11 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.boolean "prometheus_metrics_enabled", default: false, null: false t.boolean "help_page_hide_commercial_content", default: false t.string "help_page_support_url" - t.integer "performance_bar_allowed_group_id" t.boolean "password_authentication_enabled" + t.integer "performance_bar_allowed_group_id" + t.boolean "hashed_storage_enabled", default: false, null: false + t.boolean "project_export_enabled", default: true, null: false + t.boolean "auto_devops_enabled", default: false, null: false end create_table "audit_events", force: :cascade do |t| @@ -163,16 +170,18 @@ ActiveRecord::Schema.define(version: 20170807160457) do create_table "broadcast_messages", force: :cascade do |t| t.text "message", null: false - t.datetime "starts_at" - t.datetime "ends_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "starts_at", null: false + t.datetime "ends_at", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "color" t.string "font" - t.text "message_html" + t.text "message_html", null: false t.integer "cached_markdown_version" end + add_index "broadcast_messages", ["starts_at", "ends_at", "id"], name: "index_broadcast_messages_on_starts_at_and_ends_at_and_id", using: :btree + create_table "chat_names", force: :cascade do |t| t.integer "user_id", null: false t.integer "service_id", null: false @@ -240,6 +249,8 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.integer "stage_id" t.integer "artifacts_file_store", default: 1, null: false t.integer "artifacts_metadata_store", default: 1, null: false + t.boolean "protected" + t.integer "failure_reason" end add_index "ci_builds", ["auto_canceled_by_id"], name: "index_ci_builds_on_auto_canceled_by_id", using: :btree @@ -247,7 +258,9 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_index "ci_builds", ["commit_id", "status", "type"], name: "index_ci_builds_on_commit_id_and_status_and_type", using: :btree add_index "ci_builds", ["commit_id", "type", "name", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_name_and_ref", using: :btree add_index "ci_builds", ["commit_id", "type", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_ref", using: :btree + add_index "ci_builds", ["id"], name: "index_for_ci_builds_retried_migration", where: "(retried IS NULL)", using: :btree, opclasses: {"id)"=>"WHERE"} add_index "ci_builds", ["project_id"], name: "index_ci_builds_on_project_id", using: :btree + add_index "ci_builds", ["protected"], name: "index_ci_builds_on_protected", using: :btree add_index "ci_builds", ["runner_id"], name: "index_ci_builds_on_runner_id", using: :btree add_index "ci_builds", ["stage_id"], name: "index_ci_builds_on_stage_id", using: :btree add_index "ci_builds", ["status", "type", "runner_id"], name: "index_ci_builds_on_status_and_type_and_runner_id", using: :btree @@ -264,8 +277,8 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.string "encrypted_value_iv" t.integer "group_id", null: false t.boolean "protected", default: false, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false end add_index "ci_group_variables", ["group_id", "key"], name: "index_ci_group_variables_on_group_id_and_key", unique: true, using: :btree @@ -277,8 +290,8 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.string "encrypted_value_salt" t.string "encrypted_value_iv" t.integer "pipeline_schedule_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime_with_timezone "created_at" + t.datetime_with_timezone "updated_at" end add_index "ci_pipeline_schedule_variables", ["pipeline_schedule_id", "key"], name: "index_ci_pipeline_schedule_variables_on_schedule_id_and_key", unique: true, using: :btree @@ -330,6 +343,8 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.integer "auto_canceled_by_id" t.integer "pipeline_schedule_id" t.integer "source" + t.integer "config_source" + t.boolean "protected" end add_index "ci_pipelines", ["auto_canceled_by_id"], name: "index_ci_pipelines_on_auto_canceled_by_id", using: :btree @@ -365,6 +380,7 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.string "architecture" t.boolean "run_untagged", default: true, null: false t.boolean "locked", default: false, null: false + t.integer "access_level", default: 0, null: false end add_index "ci_runners", ["contacted_at"], name: "index_ci_runners_on_contacted_at", using: :btree @@ -378,6 +394,8 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.datetime "created_at" t.datetime "updated_at" t.string "name" + t.integer "status" + t.integer "lock_version" end add_index "ci_stages", ["pipeline_id", "name"], name: "index_ci_stages_on_pipeline_id_and_name", using: :btree @@ -518,23 +536,19 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_index "environments", ["project_id", "slug"], name: "index_environments_on_project_id_and_slug", unique: true, using: :btree create_table "events", force: :cascade do |t| - t.string "target_type" - t.integer "target_id" - t.string "title" - t.text "data" t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "action" - t.integer "author_id" + t.integer "author_id", null: false + t.integer "target_id" + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false + t.integer "action", limit: 2, null: false + t.string "target_type" end add_index "events", ["action"], name: "index_events_on_action", using: :btree add_index "events", ["author_id"], name: "index_events_on_author_id", using: :btree - add_index "events", ["created_at"], name: "index_events_on_created_at", using: :btree - add_index "events", ["project_id"], name: "index_events_on_project_id", using: :btree - add_index "events", ["target_id"], name: "index_events_on_target_id", using: :btree - add_index "events", ["target_type"], name: "index_events_on_target_type", using: :btree + add_index "events", ["project_id", "id"], name: "index_events_on_project_id_and_id", using: :btree + add_index "events", ["target_type", "target_id"], name: "index_events_on_target_type_and_target_id", using: :btree create_table "feature_gates", force: :cascade do |t| t.string "feature_key", null: false @@ -564,8 +578,8 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_index "forked_project_links", ["forked_to_project_id"], name: "index_forked_project_links_on_forked_to_project_id", unique: true, using: :btree create_table "gpg_keys", force: :cascade do |t| - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false t.integer "user_id" t.binary "primary_keyid" t.binary "fingerprint" @@ -577,15 +591,15 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_index "gpg_keys", ["user_id"], name: "index_gpg_keys_on_user_id", using: :btree create_table "gpg_signatures", force: :cascade do |t| - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false t.integer "project_id" t.integer "gpg_key_id" - t.boolean "valid_signature" t.binary "commit_sha" t.binary "gpg_key_primary_keyid" t.text "gpg_key_user_name" t.text "gpg_key_user_email" + t.integer "verification_status", limit: 2, default: 0, null: false end add_index "gpg_signatures", ["commit_sha"], name: "index_gpg_signatures_on_commit_sha", unique: true, using: :btree @@ -776,8 +790,8 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_index "members", ["user_id"], name: "index_members_on_user_id", using: :btree create_table "merge_request_diff_commits", id: false, force: :cascade do |t| - t.datetime "authored_date" - t.datetime "committed_date" + t.datetime_with_timezone "authored_date" + t.datetime_with_timezone "committed_date" t.integer "merge_request_diff_id", null: false t.integer "relative_order", null: false t.binary "sha", null: false @@ -974,6 +988,7 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.text "note_html" t.integer "cached_markdown_version" t.text "change_position" + t.boolean "resolved_by_push" end add_index "notes", ["author_id"], name: "index_notes_on_author_id", using: :btree @@ -1097,6 +1112,16 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_index "project_authorizations", ["project_id"], name: "index_project_authorizations_on_project_id", using: :btree add_index "project_authorizations", ["user_id", "project_id", "access_level"], name: "index_project_authorizations_on_user_id_project_id_access_level", unique: true, using: :btree + create_table "project_auto_devops", 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.boolean "enabled" + t.string "domain" + end + + add_index "project_auto_devops", ["project_id"], name: "index_project_auto_devops_on_project_id", unique: true, using: :btree + create_table "project_features", force: :cascade do |t| t.integer "project_id" t.integer "merge_requests_access_level" @@ -1180,6 +1205,7 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.string "repository_storage", default: "default", null: false t.boolean "request_access_enabled", default: false, null: false t.boolean "has_external_wiki" + t.string "ci_config_path" t.boolean "lfs_enabled" t.text "description_html" t.boolean "only_allow_merge_if_all_discussions_are_resolved" @@ -1187,9 +1213,10 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.integer "auto_cancel_pending_pipelines", default: 1, null: false t.string "import_jid" t.integer "cached_markdown_version" - t.datetime "last_repository_updated_at" - t.string "ci_config_path" t.text "delete_error" + t.datetime "last_repository_updated_at" + t.integer "storage_version", limit: 2 + t.boolean "resolve_outdated_diff_discussions" end add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree @@ -1256,6 +1283,19 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_index "protected_tags", ["project_id"], name: "index_protected_tags_on_project_id", using: :btree + create_table "push_event_payloads", id: false, force: :cascade do |t| + t.integer "commit_count", limit: 8, null: false + t.integer "event_id", null: false + t.integer "action", limit: 2, null: false + t.integer "ref_type", limit: 2, null: false + t.binary "commit_from" + t.binary "commit_to" + t.text "ref" + t.string "commit_title", limit: 70 + end + + add_index "push_event_payloads", ["event_id"], name: "index_push_event_payloads_on_event_id", unique: true, using: :btree + create_table "redirect_routes", force: :cascade do |t| t.integer "source_id", null: false t.string "source_type", null: false @@ -1495,6 +1535,16 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_index "user_agent_details", ["subject_id", "subject_type"], name: "index_user_agent_details_on_subject_id_and_subject_type", using: :btree + create_table "user_synced_attributes_metadata", force: :cascade do |t| + t.boolean "name_synced", default: false + t.boolean "email_synced", default: false + t.boolean "location_synced", default: false + t.integer "user_id", null: false + t.string "provider" + end + + add_index "user_synced_attributes_metadata", ["user_id"], name: "index_user_synced_attributes_metadata_on_user_id", unique: true, using: :btree + create_table "users", force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false @@ -1560,8 +1610,7 @@ ActiveRecord::Schema.define(version: 20170807160457) do t.boolean "notified_of_own_activity" t.string "preferred_language" t.string "rss_token" - t.boolean "external_email", default: false, null: false - t.string "email_provider" + t.integer "theme_id", limit: 2 end add_index "users", ["admin"], name: "index_users_on_admin", using: :btree @@ -1655,7 +1704,8 @@ ActiveRecord::Schema.define(version: 20170807160457) do 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 "environments", "projects", name: "fk_d1c8c1da6a", on_delete: :cascade - add_foreign_key "events", "projects", name: "fk_0434b48643", on_delete: :cascade + 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 "forked_project_links", "projects", column: "forked_to_project_id", name: "fk_434510edb0", on_delete: :cascade add_foreign_key "gpg_keys", "users", on_delete: :cascade add_foreign_key "gpg_signatures", "gpg_keys", on_delete: :nullify @@ -1664,6 +1714,7 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_foreign_key "issue_assignees", "users", name: "fk_5e0c8d9154", on_delete: :cascade add_foreign_key "issue_metrics", "issues", on_delete: :cascade add_foreign_key "issues", "projects", name: "fk_899c8f3231", on_delete: :cascade + add_foreign_key "issues", "users", column: "author_id", name: "fk_05f1e72feb", on_delete: :nullify add_foreign_key "label_priorities", "labels", on_delete: :cascade add_foreign_key "label_priorities", "projects", on_delete: :cascade add_foreign_key "labels", "namespaces", column: "group_id", on_delete: :cascade @@ -1687,6 +1738,7 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_foreign_key "personal_access_tokens", "users" 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 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 @@ -1695,9 +1747,10 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_foreign_key "protected_branch_push_access_levels", "protected_branches", name: "fk_9ffc86a3d9", 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_tag_create_access_levels", "protected_tags" + 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 "releases", "projects", name: "fk_47fe2a0596", on_delete: :cascade add_foreign_key "services", "projects", name: "fk_71cce407f9", on_delete: :cascade add_foreign_key "snippets", "projects", name: "fk_be41fd4bb7", on_delete: :cascade @@ -1708,6 +1761,7 @@ ActiveRecord::Schema.define(version: 20170807160457) do add_foreign_key "todos", "projects", name: "fk_45054f9c45", on_delete: :cascade add_foreign_key "trending_projects", "projects", on_delete: :cascade add_foreign_key "u2f_registrations", "users" + add_foreign_key "user_synced_attributes_metadata", "users", on_delete: :cascade add_foreign_key "users_star_projects", "projects", name: "fk_22cd27ddfc", 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 |