Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJob van der Voort <job@gitlab.com>2014-04-07 18:03:49 +0400
committerJob van der Voort <job@gitlab.com>2014-04-07 18:03:49 +0400
commit6d196962670b35ea48588aad3cfdb6f2d11febab (patch)
tree43ecdf0599332cbe3f49376846e5dd2cb7fb36a0 /db/migrate/20140407135544_fix_namespaces.rb
parent11d3a00c28677e3b20582535247945f3d7670fad (diff)
Fix faulty namespaces
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..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