Database schema changes between rc2 & rc3?

13116, modifié il y a 21 années. New Member Publications: 2 Date d'inscription: 19/08/04 Publications récentes
Hi.<br /><br />I originally downloaded and installed 2.2.0rc2, and set up SQL Server as my database.<br /><br />When rc3 became available, I downloaded it and installed it over the rc2 installation. I also downloaded the sql ZIP file, but I could not see an update script from rc2 to rc3 within it.<br /><br />However, I am now getting the following errors in the log when I try to delete a user:<br /><br />2004-08-22 07:45:00,525 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 207, SQLState: 42S22<br />2004-08-22 07:45:00,525 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Invalid column name &#39;title&#39;.<br />2004-08-22 07:45:00,525 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 207, SQLState: 42S22<br />2004-08-22 07:45:00,525 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Invalid column name &#39;displayDate&#39;.<br />2004-08-22 07:45:00,525 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 207, SQLState: 42S22<br />2004-08-22 07:45:00,526 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Invalid column name &#39;propsCount&#39;.<br />2004-08-22 07:45:00,526 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 207, SQLState: 42S22<br />2004-08-22 07:45:00,526 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Invalid column name &#39;commentsCount&#39;.<br />2004-08-22 07:45:00,526 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 207, SQLState: 42S22<br />2004-08-22 07:45:00,526 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Invalid column name &#39;displayDate&#39;.<br />2004-08-22 07:45:00,527 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: HY000<br />2004-08-22 07:45:00,527 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Unspecified error returned.<br />2004-08-22 07:45:00,528 DEBUG [net.sf.hibernate.util.JDBCExceptionReporter] SQL Exception<br />java.sql.SQLException: Invalid column name &#39;title&#39;.<br /> at net.sourceforge.jtds.jdbc.SqlMessage.toSQLException(SqlMessage.java:392)<br /> at net.sourceforge.jtds.jdbc.SQLWarningChain.addOrReturn(SQLWarningChain.java:91)<br /> at net.sourceforge.jtds.jdbc.Tds.submitProcedure(Tds.java:235)<br /> at net.sourceforge.jtds.jdbc.PreparedStatement_base.submitProcedure(PreparedStatement_base.java:195)<br /> at net.sourceforge.jtds.jdbc.PreparedStatement_base.findOrCreateProcedure(PreparedStatement_base.java:179)<br /> at net.sourceforge.jtds.jdbc.PreparedStatement_base.execute(PreparedStatement_base.java:131)<br /> at net.sourceforge.jtds.jdbc.PreparedStatement_base.executeQuery(PreparedStatement_base.java:262)<br /> at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:314)<br /> at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)<br /> at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)<br /> at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)<br /> at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)<br /> at net.sf.hibernate.loader.Loader.doList(Loader.java:955)<br /> at net.sf.hibernate.loader.Loader.list(Loader.java:946)<br /> at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)<br /> at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)<br /> at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)<br /> at com.liferay.portlet.blogs.ejb.BlogsEntryPersistence.findByUserId(BlogsEntryPersistence.java:434)<br /> at com.liferay.portlet.blogs.ejb.BlogsEntryUtil.findByUserId(BlogsEntryUtil.java:185)<br /> at com.liferay.portlet.blogs.ejb.BlogsEntryLocalManagerEJB.deleteAll(BlogsEntryLocalManagerEJB.java:46)<br /><br />The delete obviously fails.<br /><br />I deleted the rc2 downloads after getting rc3, and they are no longer available on SourceForge, so I can&#39;t do a diff to see what has changed.<br /><br />So, is there a database upgrade script, and if so, where can I get it? If not, have I found a bug?<br /><br />Thanks.<br /><br />Stephen
13086, modifié il y a 21 années. Liferay Legend Publications: 1254 Date d'inscription: 18/08/04 Publications récentes
Stephen,<br /><br />I constructed this myself as I followed CVS HEAD, should be OK for RC2-RC3 update, but please check yourself, all care, no responsibility etc. <!--emo&emoticon--><img src='@theme_images_path@/emotions/big_grin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo--> .<br /><br />You may need to convert to SQLServer-speak, or copy the matching entries from update-2.1.1-2.2.0.sql<br /><br />Regards<br /><br />Brett Randall<br /><br />-----<br /><br />BlogsComments<br /><br />alter table BlogsComments add content text null;<br /><br />BlogsEntry<br /><br />alter table BlogsEntry add title varchar(100) null;<br />alter table BlogsEntry add displayDate datetime null;<br />alter table BlogsEntry add propsCount int;<br />alter table BlogsEntry add commentsCount int;<br /><br />MailReceipt<br /><br />create table MailReceipt (<br /> receiptId VARCHAR(100) not null primary key,<br /> companyId VARCHAR(100) not null,<br /> userId VARCHAR(100) not null,<br /> createDate DATE null,<br /> modifiedDate DATE null,<br /> recipientName VARCHAR(100) null,<br /> recipientAddress VARCHAR(100) null,<br /> subject VARCHAR(100) null,<br /> sentDate DATE null,<br /> readCount INTEGER,<br /> firstReadDate DATE null,<br /> lastReadDate DATE null<br />);<br /><br />MBThread<br /><br />alter table MBThread add messageCount int;<br />alter table MBThread add lastPostDate datetime null;<br /><br />MBTopic<br /><br />change readRoles and writeroles both to VARCHAR(100) null<br /><br />Indexes ...<br /><br />create index BlogsEntry_ix_U_C on BlogsEntry (userId, categoryId);<br />create index BlogsEntry_ix_U_C_S on BlogsEntry (userId, categoryId, sharing);<br />create index BlogsEntry_ix_U_S_DD on BlogsEntry (userId, sharing, displayDate);<br />create index BlogsEntry_ix_U_C_S_DD on BlogsEntry (userId, categoryId, sharing, displayDate);<br /><br />create index BlogsProps_ix_U_E on BlogsProps (userId, entryId);<br />create index BlogsProps_ix_E_Q on BlogsProps (entryId, quantity);<br /><br />create index CalEvent_ix_G_C_SD on CalEvent (groupId, companyId, startDate, timeZoneSensitive, repeating);<br />create index CalEvent_ix_G_U_SD on CalEvent (groupId, userId, startDate, timeZoneSensitive, repeating);<br /><br />create index MailReceipt_ix_CompanyId on MailReceipt (companyId);<br />create index MailReceipt_ix_UserId on MailReceipt (userId);<br />
13116, modifié il y a 21 années. New Member Publications: 2 Date d'inscription: 19/08/04 Publications récentes
Hi Brett.<br /><br />Thanks for that. It has solved my problem.<br /><br />Regards,<br /><br />Stephen
thumbnail
2, modifié il y a 21 années. Liferay Master Publications: 758 Date d'inscription: 05/08/04 Publications récentes
We don&#39;t keep track of db changes between RC&#39;s because we don&#39;t recommend using RC&#39;s in a production environment. if you&#39;re using a RC, except to just drop and rebuild the db.<br /><br />But we do keep track of changes from finals to finals so production sites can be updated easily (do make a backup though)