Fix for postgresql
This commit is contained in:
parent
67729cecc1
commit
0b20d850cb
|
@ -17,7 +17,7 @@ class MigrateProjectStatistics < ActiveRecord::Migration
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
add_column_with_default :projects, :repository_size, :float, default: 0.0
|
add_column :projects, :repository_size, :float, default: 0.0
|
||||||
add_column_with_default :projects, :commit_count, :integer, default: 0
|
add_column :projects, :commit_count, :integer, default: 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,6 +17,6 @@ class AddLowerPathIndexToRoutes < ActiveRecord::Migration
|
||||||
def down
|
def down
|
||||||
return unless Gitlab::Database.postgresql?
|
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
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,4 +8,8 @@ class AddIndexToProjectAuthorizations < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
add_concurrent_index(:project_authorizations, :project_id)
|
add_concurrent_index(:project_authorizations, :project_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_index(:project_authorizations, :project_id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,11 @@ class AddOwnerIdForeignKey < ActiveRecord::Migration
|
||||||
|
|
||||||
disable_ddl_transaction!
|
disable_ddl_transaction!
|
||||||
|
|
||||||
def change
|
def up
|
||||||
add_concurrent_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :cascade
|
add_concurrent_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :cascade
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_foreign_key :ci_triggers, column: :owner_id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue