Opened 9 years ago
Closed 9 years ago
#12697 closed enhancement (fixed)
SQL logs from destination environment
Reported by: | Ryan J Ollos | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | TracMigratePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
I'm seeing some warnings on migration, which I'm guessing may be related to trac:#8396.
$ trac-admin /var/trac migrate -i mysql://tracuser:<password>@localhost:3306/trac Upgrading SimpleMultiProject database schema SimpleMultiProject database schema version is 0, should be 6 Copying tables: attachment table... 7268 records. auth_cookie table... 1 records. cache table... 7 records. component table... 95 records. enum table... 40 records. milestone table... 127 records. node_change table... 230975 records. permission table... 67 records. report table... 72 records. repository table... 11 records. revision table... 26318 records. session table... 192 records. session_attribute table... /usr/lib/python2.6/site-packages/Trac-1.0.10-py2.6.egg/trac/db/util.py:72: Warning: Column 'authenticated' cannot be null return self.cursor.execute(sql_escape_percent(sql), args) session_attribute table... 1096 records. smp_component_project table... 59 records. smp_milestone_project table... 58 records. smp_project table... 21 records. smp_version_project table... 0 records. system table... 3 records. ticket table... /usr/lib/python2.6/site-packages/Trac-1.0.10-py2.6.egg/trac/db/util.py:72: Warning: Data truncated for column 'description' at row 27 return self.cursor.execute(sql_escape_percent(sql), args) ticket table... 19506 records. ticket_change table... /usr/lib/python2.6/site-packages/Trac-1.0.10-py2.6.egg/trac/db/util.py:72: Warning: Data truncated for column 'newvalue' at row 34 return self.cursor.execute(sql_escape_percent(sql), args) ticket_change table... /usr/lib/python2.6/site-packages/Trac-1.0.10-py2.6.egg/trac/db/util.py:72: Warning: Data truncated for column 'newvalue' at row 45 return self.cursor.execute(sql_escape_percent(sql), args) ticket_change table... /usr/lib/python2.6/site-packages/Trac-1.0.10-py2.6.egg/trac/db/util.py:72: Warning: Data truncated for column 'newvalue' at row 36 return self.cursor.execute(sql_escape_percent(sql), args) ticket_change table... 156755 records. ticket_custom table... 134688 records. version table... 0 records. wiki table... 9614 records.
Do you think it would make sense to enable [trac] debug_sql
and set [logging] log_level
to DEBUG
, and save the logs from the temporary environment?
That might not be necessary, but I thought it might be helpful. I'll poke at the database some more given what we know about the field size limitations that are documented in trac:#8396.
Attachments (0)
Change History (5)
comment:1 follow-up: 4 Changed 9 years ago by
comment:2 Changed 9 years ago by
I ran a migration to a new environment with the comment:1 patch and debug_sql = enabled
. The SQL statements in the logs did not look very useful, so we can probably just close this ticket.
Another thing, just for future reference. In the message Warning: Data truncated for column 'description' at row 27, the row number does not seem to correspond to the row in the destination table. I'm guessing it is a row number in the chunked data insert. The actual ticket id for this case was 3628, and the ticket numbering has started at 1, with few or no missing tickets.
comment:4 Changed 9 years ago by
comment:5 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for apply fix and adding tests. I'll make sure the fix and tests get ported over to trac:#12299.
Is it intentional to skip the
[trac]
section of trac.ini when migrating to a new environment? Does this change make sense:tracmigrateplugin/0.12/tracmigrate/admin.py
orname == 'database':