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:
authorAndrew8xx8 <avk@8xx8.ru>2013-03-25 00:39:38 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-03-25 00:39:38 +0400
commitb3dc4fb72146d439314bdb40377272a317974397 (patch)
tree3ccc3d4475953f9b6a2e23f8caddb62dd09686d5 /db/migrate/20130324203535_add_type_value_for_snippets.rb
parent3b6228dc27fad65250884256bec05a66e1dff74c (diff)
Migrations to convert data added
Diffstat (limited to 'db/migrate/20130324203535_add_type_value_for_snippets.rb')
-rw-r--r--db/migrate/20130324203535_add_type_value_for_snippets.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20130324203535_add_type_value_for_snippets.rb b/db/migrate/20130324203535_add_type_value_for_snippets.rb
new file mode 100644
index 00000000000..8c05dd2cc71
--- /dev/null
+++ b/db/migrate/20130324203535_add_type_value_for_snippets.rb
@@ -0,0 +1,8 @@
+class AddTypeValueForSnippets < ActiveRecord::Migration
+ def up
+ Snippet.where("project_id IS NOT NULL").update_all(type: 'ProjectSnippet')
+ end
+
+ def down
+ end
+end