https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292015-09-25T00:06:45ZRedmineRedmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=661852015-09-25T00:06:45ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li></ul><p>No problem with my installation of 3.1.1. journal_details table have not been changed since Redmine 1.1 (<a class="changeset" title="Keep track of issue description changes (#746)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4954">r4954</a>).</p>
<pre>
$ grep -l journal_details db/migrate/*
db/migrate/007_create_journals.rb
db/migrate/20110227125750_change_journal_details_values_to_text.rb
</pre>
<p>Could you describe detailed upgrade procedure you have done?</p> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=661862015-09-25T00:07:12ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/15483">Defect #15483</a>: Error 500 on Issue Update (postgres)</i> added</li></ul> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=662022015-09-25T12:54:46ZJohn Janus
<ul></ul><p>I installed Redmine on the Linux machine, created a dump from the database on the Windows box, put that into the new database and started<br />"bundle exec rake db:migrate RAILS_ENV=production" <br />as described at <a class="external" href="http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade">http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade</a></p>
<p>It might be possible, that the initial bitnami Windows install was already defective, as the type of the fields are set to varchar(255) on the Windows box as well.<br />It was however never a problem to change the description on that install.<br />the commands i issued were:<br /><pre>
mysqldump -h<winmachine> -u<user> -p<pass> bitnami_redmine > redminedump.sql
mysql -u<user> -p<pass> -D redmine < redminedump.sql
bundle exec rake db:migrate RAILS_ENV=production
</pre><br />After changing the types to text, the issue is solved.</p> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=667942015-10-22T05:14:46ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>Needs feedback</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Invalid</i></li></ul><p>Thank you for your feedback.</p> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=682322016-01-04T10:00:10ZAnonymous
<ul><li><strong>File</strong> <a href="/attachments/14931">sqlite3-to-mysql.py</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14931/sqlite3-to-mysql.py">sqlite3-to-mysql.py</a> added</li><li><strong>File</strong> <a href="/attachments/14933">dump_error.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14933/dump_error.log">dump_error.log</a> added</li></ul><p>Hi,</p>
<p>I get the same issue (full stack attached) : <br /><pre>
Mysql2::Error: Data too long for column 'old_value' at row 880: ALTER TABLE `journal_details` CHANGE `old_value` `old_value` varchar(255) DEFAULT NULL/home/qes/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:305:in `query'
</pre></p>
<p>I'm upgrading from <code>Redmine 1.x</code><br /><pre>
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.8.15
Rack version 1.3
Rails version 2.3.14
Active Record version 2.3.14
Active Resource version 2.3.14
Action Mailer version 2.3.14
Active Support version 2.3.14
Edge Rails revision unknown
Application root /usr/share/redmine
Environment production
Database adapter sqlite3
Database schema version 20110902000000
</pre></p>
<p>To <code>Redmine 3.x</code><br /><pre>
Environment:
Redmine version 3.2.0.stable
Ruby version 2.2.1-p85 (2015-02-26) [x86_64-linux]
Rails version 4.2.5
Environment production
Database adapter Mysql2
SCM:
Subversion 1.6.17
Git 1.7.10.4
Filesystem
Redmine plugins:
no plugin installed
</pre></p>
<p>I dump my <code>sqlite3</code> and use a script to translate the dump to <code>MySQL</code> format (cf. attachment)</p>
<p>I can see in sqlite3 and MySQL dump this kind of line that is clearly larger than 255 chars : <br /><pre>
INSERT INTO "journal_details" VALUES(1171,1055,'attr','description','En profil documentaliste, les bordereau de recherche ne tient pas dans l''écran^M
==> nécessité d''utiliser la barre de scroll pour valider.^M
^M
Demande : faire tenir la fenêtre dans l''écran.^M
','En profil documentaliste, les bordereaux de recherche ne tiennent pas dans l''écran^M
==> nécessité d''utiliser la barre de scroll pour valider.^M
^M
Demande : faire tenir la fenêtre dans l''écran.^M
');
</pre></p>
<p>What I don't understand, is that the column <code>old_value</code> is already <code>varchar(255)</code>, but data bigger than 255 was inserted in it without problem.</p> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=682432016-01-04T13:25:44ZAnonymous
<ul></ul><p>Well, for now, I shrinked too large values with this queries :</p>
<pre>
use redmine;
update journal_details set old_value = left(old_value, 255) where length(old_value) > 255;
update journal_details set value = left(value, 255) where length(value) > 255;
</pre> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=685092016-01-12T12:01:42ZToshi MARUYAMA
<ul></ul><p>Patrick Ferreira wrote:</p>
<blockquote>
<p>What I don't understand, is that the column <code>old_value</code> is already <code>varchar(255)</code>, but data bigger than 255 was inserted in it without problem.</p>
</blockquote>
<p><code>old_value</code> should be <code>text</code>, not <code>varchar(255)</code>.</p> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=732542016-09-04T16:45:16ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/23741">Defect #23741</a>: unable to modify the issue description</i> added</li></ul> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=732782016-09-05T12:57:47ZToshi MARUYAMA
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/23741">Defect #23741</a>: unable to modify the issue description</i>)</li></ul> Redmine - Defect #20831: journal_details table reverted value and old_value back to String on update from 2.6.0 to 3.1.1https://www.redmine.org/issues/20831?journal_id=732822016-09-05T13:00:41ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/23741">Defect #23741</a>: unable to modify the issue description</i> added</li></ul>