diff --git a/db/migrate/20140407135544_fix_namespaces.rb b/db/migrate/20140407135544_fix_namespaces.rb new file mode 100644 index 00000000000..6207cf18d65 --- /dev/null +++ b/db/migrate/20140407135544_fix_namespaces.rb @@ -0,0 +1,10 @@ +class FixNamespaces < ActiveRecord::Migration + def up + Namespace.where('name <> path and type is null').each do |namespace| + namespace.update_attribute(:name, namespace.path) + end + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index d8a9d1863fc..9033aa92ac9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140313092127) do +ActiveRecord::Schema.define(version: 20140407135544) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql"