Commit bf28506f authored by Timothy Andrew's avatar Timothy Andrew
Browse files

Add a migration to remove soft-deleted groups.

The database should not have any soft-deleted groups. Due to a race
condition (soft-delete completes after the hard-delete), soft-deleted
groups were (incorrectly) left in the database, causing issues while
trying to create a new group with the same name.
parent 26846ef940dc
# See
# for more information on how to write migrations for GitLab.
class RemoveUndeletedGroups < ActiveRecord::Migration
DOWNTIME = false
def up
execute "DELETE FROM namespaces WHERE deleted_at IS NOT NULL;"
def down
# This is an irreversible migration;
# If someone is trying to rollback for other reasons, we should not throw an Exception.
# raise ActiveRecord::IrreversibleMigration
......@@ -11,7 +11,7 @@
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20161113184239) do
ActiveRecord::Schema.define(version: 20161117114805) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
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