thomasklein / redmine2mite

Redmine2mite connects your Redmine account with your mite.account. Track your time easily on issues within Redmine and get them automatically send to mite.
http://mite.yo.lk/
MIT License
13 stars 6 forks source link

Migration fails on PostgreSQL #2

Closed tdavis closed 14 years ago

tdavis commented 14 years ago

in _005_add_mite_omit_transmission_option_to_userpreferences.rb, you try to set the default of a boolean field to 0. PostgreSQL doesn't like this.

May not apply to MySQL, but here's an easy fix:

diff --git a/redmine2mite/db/migrate/005_add_mite_omit_transmission_option_to_user_preferences.rb b/redmine2
index 786a53f..535c80d 100644
--- a/redmine2mite/db/migrate/005_add_mite_omit_transmission_option_to_user_preferences.rb
+++ b/redmine2mite/db/migrate/005_add_mite_omit_transmission_option_to_user_preferences.rb
@@ -1,9 +1,9 @@
 class AddMiteOmitTransmissionOptionToUserPreferences < ActiveRecord::Migration
   def self.up
-    add_column :user_preferences, :mite_omit_transmission_option, :boolean, :default => 0
+    add_column :user_preferences, :mite_omit_transmission_option, :boolean, :default => false
   end

   def self.down
     remove_column :user_preferences, :mite_omit_transmission_option
   end
-end
\ No newline at end of file
+end
thomasklein commented 14 years ago

Hey Tom! Thank you for sharing this - i published your fix!