summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-07 15:45:37 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-07 15:45:37 +0000
commit8df66046d90cc4f4c53d8cf67ca2af5fcf87fd49 (patch)
tree72c68febe9bc9624c9d43b66db06380313449916
parent26c5102002ac78bb328e11a2f273800e853b3fa9 (diff)
parent52cf11b9f2f22218abd79aa3936ddb7f0d6cee59 (diff)
downloadgitlab-ce-8df66046d90cc4f4c53d8cf67ca2af5fcf87fd49.tar.gz
Merge branch 'fix-faulty-namespaces' into 'master'
Fix faulty namespaces Fixes #908 Now with updated schema.
-rw-r--r--db/migrate/20140407135544_fix_namespaces.rb10
-rw-r--r--db/schema.rb2
2 files changed, 11 insertions, 1 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
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"