summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-06-14 09:19:20 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-06-14 09:19:20 +0000
commit7642b5a9ab180aaedee24c6b4e38eb28cafd00b3 (patch)
treed7fb81525f680c62019c425ae29ecde4149e7b7f /db
parent5e76040256c4a86485caf010cc9c9c8329e7aafa (diff)
downloadredmine-7642b5a9ab180aaedee24c6b4e38eb28cafd00b3.tar.gz
redmine-7642b5a9ab180aaedee24c6b4e38eb28cafd00b3.zip
Fixed: editing a message may cause sticky attribute to be NULL (#3356).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2787 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20090614091200_fix_messages_sticky_null.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20090614091200_fix_messages_sticky_null.rb b/db/migrate/20090614091200_fix_messages_sticky_null.rb
new file mode 100644
index 000000000..cbe741732
--- /dev/null
+++ b/db/migrate/20090614091200_fix_messages_sticky_null.rb
@@ -0,0 +1,9 @@
+class FixMessagesStickyNull < ActiveRecord::Migration
+ def self.up
+ Message.update_all('sticky = 0', 'sticky IS NULL')
+ end
+
+ def self.down
+ # nothing to do
+ end
+end