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:
Diffstat (limited to 'db/ci/migrate/20140823225019_create_commits_from_builds.rb')
-rw-r--r--db/ci/migrate/20140823225019_create_commits_from_builds.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/db/ci/migrate/20140823225019_create_commits_from_builds.rb b/db/ci/migrate/20140823225019_create_commits_from_builds.rb
new file mode 100644
index 00000000000..15f84b11511
--- /dev/null
+++ b/db/ci/migrate/20140823225019_create_commits_from_builds.rb
@@ -0,0 +1,22 @@
+class CreateCommitsFromBuilds < ActiveRecord::Migration
+ def change
+ create_table :commits do |t|
+ t.integer :project_id
+ t.string :ref, nil: false
+ t.string :sha, nil: false
+ t.string :before_sha, nil: false
+ t.text :push_data, nil: false
+
+ t.timestamps
+ end
+
+ add_column :builds, :commit_id, :integer
+
+ # Remove commit data from builds
+ #remove_column :builds, :project_id, :integer
+ #remove_column :builds, :ref, :string
+ #remove_column :builds, :sha, :string
+ #remove_column :builds, :before_sha, :string
+ #remove_column :builds, :push_data, :text
+ end
+end