Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-10 00:06:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-10 00:06:24 +0300
commit4b28d5ae770c6bd332283a3f13ceae06329c409b (patch)
treeae4d46e1d017002935fe75dc14cb3c108be12fae /db/migrate/20191004133612_create_analytics_repository_file_commits.rb
parent41efffa17c67405ca5f5dac49d72be7872cee339 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20191004133612_create_analytics_repository_file_commits.rb')
-rw-r--r--db/migrate/20191004133612_create_analytics_repository_file_commits.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20191004133612_create_analytics_repository_file_commits.rb b/db/migrate/20191004133612_create_analytics_repository_file_commits.rb
new file mode 100644
index 00000000000..f2064b2b301
--- /dev/null
+++ b/db/migrate/20191004133612_create_analytics_repository_file_commits.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class CreateAnalyticsRepositoryFileCommits < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def change
+ create_table :analytics_repository_file_commits do |t|
+ t.references :analytics_repository_file, index: { name: 'index_analytics_repository_file_commits_file_id' }, foreign_key: { on_delete: :cascade }, null: false
+ t.references :project, index: false, foreign_key: { on_delete: :cascade }, null: false
+ t.date :committed_date, null: false
+ t.integer :commit_count, limit: 2, null: false
+ end
+
+ add_index :analytics_repository_file_commits,
+ [:project_id, :committed_date, :analytics_repository_file_id],
+ name: 'index_file_commits_on_committed_date_file_id_and_project_id',
+ unique: true
+ end
+end