Fix faulty namespaces
This commit is contained in:
parent
11d3a00c28
commit
6d19696267
2 changed files with 11 additions and 1 deletions
10
db/migrate/20140407135544_fix_namespaces.rb
Normal file
10
db/migrate/20140407135544_fix_namespaces.rb
Normal file
|
@ -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
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
Loading…
Reference in a new issue