Commit 0b20d850 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix for postgresql

parent 67729cec
......@@ -17,7 +17,7 @@ class MigrateProjectStatistics < ActiveRecord::Migration
end
def down
add_column_with_default :projects, :repository_size, :float, default: 0.0
add_column_with_default :projects, :commit_count, :integer, default: 0
add_column :projects, :repository_size, :float, default: 0.0
add_column :projects, :commit_count, :integer, default: 0
end
end
......@@ -17,6 +17,6 @@ class AddLowerPathIndexToRoutes < ActiveRecord::Migration
def down
return unless Gitlab::Database.postgresql?
remove_index :routes, name: :index_on_routes_lower_path
remove_index :routes, name: :index_on_routes_lower_path if index_exists?(:routes, name: :index_on_routes_lower_path)
end
end
......@@ -8,4 +8,8 @@ class AddIndexToProjectAuthorizations < ActiveRecord::Migration
def up
add_concurrent_index(:project_authorizations, :project_id)
end
def down
remove_index(:project_authorizations, :project_id)
end
end
......@@ -5,7 +5,11 @@ class AddOwnerIdForeignKey < ActiveRecord::Migration
disable_ddl_transaction!
def change
def up
add_concurrent_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :cascade
end
def down
remove_foreign_key :ci_triggers, column: :owner_id
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment