diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-17 15:22:56 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-17 15:22:56 +0200 |
commit | f0116f13354fa1e57e3ba8013ea67d3b0e193375 (patch) | |
tree | eb3768402c49b239d1898350399f0edd82da81e8 /db | |
parent | 67ca5a53f6df0c3d0f2598c777491c0548d76e50 (diff) | |
download | gitlab-ce-f0116f13354fa1e57e3ba8013ea67d3b0e193375.tar.gz |
Store commit count in project tableadvanced-cache
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20150717130904_add_commits_count_to_project.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20150717130904_add_commits_count_to_project.rb b/db/migrate/20150717130904_add_commits_count_to_project.rb new file mode 100644 index 00000000000..9b46daa5933 --- /dev/null +++ b/db/migrate/20150717130904_add_commits_count_to_project.rb @@ -0,0 +1,5 @@ +class AddCommitsCountToProject < ActiveRecord::Migration + def change + add_column :projects, :commit_count, :integer, default: 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index d6c34a77ee6..a63c2d05821 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: 20150713160110) do +ActiveRecord::Schema.define(version: 20150717130904) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -374,6 +374,7 @@ ActiveRecord::Schema.define(version: 20150713160110) do t.integer "star_count", default: 0, null: false t.string "import_type" t.string "import_source" + t.integer "commit_count", default: 0 end add_index "projects", ["created_at", "id"], name: "index_projects_on_created_at_and_id", using: :btree |