[Git][noosfero/noosfero][master] 2 commits: Adds migration to set missing positions

Rodrigo Souto gitlab at mg.gitlab.com
Mon Jul 23 13:12:23 BRT 2018


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
18d06582 by Gabriel Silva at 2018-07-20T18:09:59Z
Adds migration to set missing positions

Signed-off-by: Gabriel Silva <gabriel93.silva at gmail.com>

- - - - -
fae3fd88 by Rodrigo Souto at 2018-07-23T16:12:19Z
Merge branch 'fix-article-positions' into 'master'

Adds migration to set missing positions

See merge request noosfero/noosfero!1574
- - - - -


1 changed file:

- + db/migrate/20180720180749_set_articles_positions.rb


Changes:

=====================================
db/migrate/20180720180749_set_articles_positions.rb
=====================================
@@ -0,0 +1,9 @@
+class SetArticlesPositions < ActiveRecord::Migration
+  def up
+    Article.where(position: nil).update_all(position: 0)
+  end
+
+  def down
+    say 'this migraiton cannot be reverted'
+  end
+end



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/f417e1a562788eb43b8dd478bb664767ac1326d0...fae3fd88a1942112391b57acd5aff1a6895fc361

-- 
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/f417e1a562788eb43b8dd478bb664767ac1326d0...fae3fd88a1942112391b57acd5aff1a6895fc361
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180723/f970fb24/attachment.html>


More information about the Noosfero-dev mailing list