rails migration error default value wrong
<p>I've got an migration error in rails.</p>

<pre><code>  def self.up
    change_column_default :course_objects, :active, :default =&gt; "0"
  end
</code></pre>

<p>error is</p>

<pre><code>Mysql2::Error: Invalid default value for 'active': ALTER TABLE `course_objects`  CHANGE `active` `active` tinyint(1) DEFAULT '---\n:default: \'0\'\n'
</code></pre>

<p>also tried this:</p>

<pre><code>  def self.up
    change_column_default :course_objects, :active, :default =&gt; 0
  end
</code></pre>

<p>same error</p>

<p>What is the problem in this case?</p>