diff options
author | Vladimir Shushlin <v.shushlin@gmail.com> | 2019-09-03 13:12:11 +0300 |
---|---|---|
committer | Vladimir Shushlin <v.shushlin@gmail.com> | 2019-09-06 14:57:21 +0300 |
commit | 15752be4223d8ba562cb43cbc65e6554f46bd78c (patch) | |
tree | 1cb5e361643cf461a4da32e42d3b45b448625025 | |
parent | 9c549ad51b9b168a787bae555f2e6895e70f3986 (diff) | |
download | gitlab-ce-pages-and-artifacts-per-project-size-limits.tar.gz |
Add columns for pages and artifacts size limitspages-and-artifacts-per-project-size-limits
By analogy with repository_size_limit
* projects
* namespaces
6 files changed, 46 insertions, 1 deletions
diff --git a/changelogs/unreleased/pages-per-project-size-limit-db.yml b/changelogs/unreleased/pages-per-project-size-limit-db.yml new file mode 100644 index 00000000000..635cde53ebe --- /dev/null +++ b/changelogs/unreleased/pages-per-project-size-limit-db.yml @@ -0,0 +1,5 @@ +--- +title: Add columns for per project/group pages and artifacts size limits +merge_request: 32698 +author: +type: added diff --git a/db/migrate/20190903095845_add_project_pages_size_limit.rb b/db/migrate/20190903095845_add_project_pages_size_limit.rb new file mode 100644 index 00000000000..c0aa0d54a8d --- /dev/null +++ b/db/migrate/20190903095845_add_project_pages_size_limit.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddProjectPagesSizeLimit < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def change + add_column :projects, :pages_size_limit, :bigint + end +end diff --git a/db/migrate/20190903100026_add_namespaces_pages_size_limit.rb b/db/migrate/20190903100026_add_namespaces_pages_size_limit.rb new file mode 100644 index 00000000000..ddddb4917cb --- /dev/null +++ b/db/migrate/20190903100026_add_namespaces_pages_size_limit.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddNamespacesPagesSizeLimit < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def change + add_column :namespaces, :pages_size_limit, :bigint + end +end diff --git a/db/migrate/20190906113403_add_projects_artifacts_size_limit.rb b/db/migrate/20190906113403_add_projects_artifacts_size_limit.rb new file mode 100644 index 00000000000..2fd1b41a4aa --- /dev/null +++ b/db/migrate/20190906113403_add_projects_artifacts_size_limit.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddProjectsArtifactsSizeLimit < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def change + add_column :projects, :artifacts_size_limit, :bigint + end +end diff --git a/db/migrate/20190906113417_add_namespaces_artifacts_size_limit.rb b/db/migrate/20190906113417_add_namespaces_artifacts_size_limit.rb new file mode 100644 index 00000000000..249445a1761 --- /dev/null +++ b/db/migrate/20190906113417_add_namespaces_artifacts_size_limit.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddNamespacesArtifactsSizeLimit < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def change + add_column :namespaces, :artifacts_size_limit, :bigint + end +end diff --git a/db/schema.rb b/db/schema.rb index 6ddfb8bcb39..a878725a45c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2019_09_05_223900) do +ActiveRecord::Schema.define(version: 2019_09_06_113417) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" @@ -2271,6 +2271,8 @@ ActiveRecord::Schema.define(version: 2019_09_05_223900) do t.integer "last_ci_minutes_usage_notification_level" t.integer "subgroup_creation_level", default: 1 t.boolean "emails_disabled" + t.bigint "pages_size_limit" + t.bigint "artifacts_size_limit" t.index ["created_at"], name: "index_namespaces_on_created_at" 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)" t.index ["file_template_project_id"], name: "index_namespaces_on_file_template_project_id" @@ -2843,6 +2845,8 @@ ActiveRecord::Schema.define(version: 2019_09_05_223900) do t.boolean "service_desk_enabled", default: true t.integer "approvals_before_merge", default: 0, null: false t.boolean "emails_disabled" + t.bigint "pages_size_limit" + t.bigint "artifacts_size_limit" 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))" t.index ["created_at"], name: "index_projects_on_created_at" t.index ["creator_id"], name: "index_projects_on_creator_id" |