summaryrefslogtreecommitdiff
path: root/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20160913162434_remove_projects_pushes_since_gc.rb')
-rw-r--r--db/migrate/20160913162434_remove_projects_pushes_since_gc.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb b/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
new file mode 100644
index 00000000000..18ea9d43a43
--- /dev/null
+++ b/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
@@ -0,0 +1,19 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class RemoveProjectsPushesSinceGc < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = true
+ DOWNTIME_REASON = 'This migration removes an existing column'
+
+ disable_ddl_transaction!
+
+ def up
+ remove_column :projects, :pushes_since_gc
+ end
+
+ def down
+ add_column_with_default :projects, :pushes_since_gc, :integer, default: 0
+ end
+end