diff options
author | Nick Thomas <nick@gitlab.com> | 2018-03-23 15:48:28 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-03-23 15:48:28 +0000 |
commit | 457a99c612acf59ec9cc4d0793c53465f914e696 (patch) | |
tree | ca474ece3e4db339d225d9789298ee78051848eb /db | |
parent | 79dd74db14ffdac34fa2eff0aa26387b29a16cb5 (diff) | |
parent | 9d45951fcaeda4f01a2e4be2480d980a3e7cd37e (diff) | |
download | gitlab-ce-457a99c612acf59ec9cc4d0793c53465f914e696.tar.gz |
Merge branch 'pages_force_https' into 'master'
HTTPS only Pages
Closes #28857
See merge request gitlab-org/gitlab-ce!16273
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180102220145_add_pages_https_only_to_projects.rb | 9 | ||||
-rw-r--r-- | db/migrate/20180109183319_change_default_value_for_pages_https_only.rb | 13 | ||||
-rw-r--r-- | db/schema.rb | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20180102220145_add_pages_https_only_to_projects.rb b/db/migrate/20180102220145_add_pages_https_only_to_projects.rb new file mode 100644 index 00000000000..ef6bc6896c0 --- /dev/null +++ b/db/migrate/20180102220145_add_pages_https_only_to_projects.rb @@ -0,0 +1,9 @@ +class AddPagesHttpsOnlyToProjects < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + add_column :projects, :pages_https_only, :boolean + end +end diff --git a/db/migrate/20180109183319_change_default_value_for_pages_https_only.rb b/db/migrate/20180109183319_change_default_value_for_pages_https_only.rb new file mode 100644 index 00000000000..c242e1b0d24 --- /dev/null +++ b/db/migrate/20180109183319_change_default_value_for_pages_https_only.rb @@ -0,0 +1,13 @@ +class ChangeDefaultValueForPagesHttpsOnly < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + change_column_default :projects, :pages_https_only, true + end + + def down + change_column_default :projects, :pages_https_only, nil + end +end diff --git a/db/schema.rb b/db/schema.rb index 56116a2d241..1be0570f85a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1513,6 +1513,7 @@ ActiveRecord::Schema.define(version: 20180320182229) do t.boolean "merge_requests_ff_only_enabled", default: false t.boolean "merge_requests_rebase_enabled", default: false, null: false t.integer "jobs_cache_index" + t.boolean "pages_https_only", default: true end add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree |