Uploaded image for project: 'Apache Roller'
  1. Apache Roller
  2. ROL-2095

Roller 510 -> 520 migration is incomplete for TIMESTAMPS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      In SVN commit 1680531 we added to mysql.properties these two lines:

      TIMESTAMP_SQL_TYPE_NULL=datetime(3) NULL
      TIMESTAMP_SQL_TYPE=datetime(3)

      Those lines effectively changed the type of all timestamp columns in Roller from timestamp to datetime(3), but we offer no migration to convert timestamp data to datatime(3) format.

      This will cause Roller to fail to work with errors like this:

      [EL Warning]: 2015-12-06 16:09:42.61-UnitOfWork(659709738)-Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
      Internal Exception: java.sql.SQLException: Cannot convert value '2014-11-27 10:25:01.000' from column 8 to TIMESTAMP.
      Error Code: 0
      Call: SELECT id, about, isactive, allowcomments, analyticscode, blacklist, creator, datecreated, defaultallowcomments, defaultcommentdays, defaultplugins, editorpage, editortheme, emailaddress, emailcomments, enablebloggerapi, enablemultilang, displaycnt, handle, icon, lastmodified, locale, commentmod, name, showalllangs, tagline, timeZone, visible, bloggercatid FROM weblog WHERE (handle = ?)
      bind => [1 parameter bound]
      Query: ReadAllQuery(name="Weblog.getByHandle" referenceClass=Weblog sql="SELECT id, about, isactive, allowcomments, analyticscode, blacklist, creator, datecreated, defaultallowcomments, defaultcommentdays, defaultplugins, editorpage, editortheme, emailaddress, emailcomments, enablebloggerapi, enablemultilang, displaycnt, handle, icon, lastmodified, locale, commentmod, name, showalllangs, tagline, timeZone, visible, bloggercatid FROM weblog WHERE (handle = ?)")

      We should either revert the datetime(3) change or add a migration for all fields effected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            djohnson David Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: