diff options
author | Job van der Voort <job@gitlab.com> | 2014-04-07 18:03:49 +0400 |
---|---|---|
committer | Job van der Voort <job@gitlab.com> | 2014-04-07 18:03:49 +0400 |
commit | 6d196962670b35ea48588aad3cfdb6f2d11febab (patch) | |
tree | 43ecdf0599332cbe3f49376846e5dd2cb7fb36a0 /db/migrate/20140407135544_fix_namespaces.rb | |
parent | 11d3a00c28677e3b20582535247945f3d7670fad (diff) |
Fix faulty namespaces
Diffstat (limited to 'db/migrate/20140407135544_fix_namespaces.rb')
-rw-r--r-- | db/migrate/20140407135544_fix_namespaces.rb | 10 |
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..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 |