summaryrefslogtreecommitdiff
path: root/db/migrate/20140407135544_fix_namespaces.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20140407135544_fix_namespaces.rb')
-rw-r--r--db/migrate/20140407135544_fix_namespaces.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20140407135544_fix_namespaces.rb b/db/migrate/20140407135544_fix_namespaces.rb
new file mode 100644
index 00000000000..8c4f2b0f6b1
--- /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 \ No newline at end of file