Current time: 05-20-2013, 09:53 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
979 revision upgrade problems
02-03-2012, 12:41 AM (This post was last modified: 02-03-2012 12:49 AM by ash.)
Post: #1
979 revision upgrade problems
Hi!

Just tried to upgrade. What is the right way of upgrading the database with no data loss?

I tried GenerateTable.php and them migrate.php. Unfortunately got errors:

PHP Fatal error: Uncaught exception 'Doctrine_Migration_Exception' with message '16 error(s) encountered during migration\n========================================\n Error #1 - SQLSTATE[HY000]: General error: 1 duplicate column name: timezone. Failing Query: "ALTER TABLE User ADD timezone VARCHAR(60)"\n#0 C:\\xampp\\htdocs\\webpagetest\\wptmonitor\\lib\\vendor\\doctrine\\Doctrine\\Con​nection.php(1025): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Sqlite), 'ALTER TABLE Use...')\n#1 C:\\xampp\\htdocs\\webpagetest\\wptmonitor\\lib\\vendor\\doctrine\\Doctrine\\Exp​ort.php(621): Doctrine_Connection->execute('ALTER TABLE Use...')\n#2 C:\\xampp\\htdocs\\webpagetest\\wptmonitor\\lib\\vendor\\doctrine\\Doctrine\\Mig​ration\\Process.php(89): Doctrine_Export->alterTable('User', Array)\n#3 C:\\xampp\\htdocs\\webpagetest\\wptmonitor\\lib\\vendor\\doctrine\\Doctrine\\Mig​ration.php(522): Doctrine_Migration_Process->processCreatedColumn(Array)\n#4 C:\\xampp\\htdocs\\webpagetest\\wptmonitor\\lib\\vendor\\doctrine\\Doctrine\\Mig​ration.php(479): Doctrine_Mi in C:\\xampp\\htdocs\\webpagetest\\wptmonitor\\lib\\vendor\\doctrine\\Doctrine\\Mig​ration.php on line 457
Just tried it with no historical data. Same error.

Artur Sudnik
Find all posts by this user
Quote this message in a reply
02-03-2012, 01:46 AM
Post: #2
RE: 979 revision upgrade problems
I think I have all the appropriate migration items in place.

I have noticed that sometimes I get errors like this, but the required updates did actually get applied and the application upgrade was successful.

Does the app work in spite of the errors?

Tony Perkins
Find all posts by this user
Quote this message in a reply
02-03-2012, 01:53 AM
Post: #3
RE: 979 revision upgrade problems
Unfortunately not. For example I have error while opening "Results" tab:

Exception : SQLSTATE[HY000]: General error: 1 no such column: w.sequencenumber. Failing Query: "SELECT w.id AS w__id, w.date AS w__date, w.wptjobid AS w__wptjobid, w.sequencenumber AS w__sequencenumber, w.urlscript AS w__urlscript, w.wpteventname AS w__wpteventname, w.wptpagetitle AS w__wptpagetitle, w.timetoloadtitle AS w__timetoloadtitle, w.timetoloadtitlerepeatview AS w__timetoloadtitlerepeatview, w.multistep AS w__multistep, w.validate AS w__validate, w.validationrequest AS w__validationrequest, w.validationtype AS w__validationtype, w.validationmarkas AS w__validationmarkas, w.validationmarkaselse AS w__validationmarkaselse, w.validationstate AS w__validationstate, w.dialerid AS w__dialerid, w.runlabel AS w__runlabel, w.wpthost AS w__wpthost, w.wptlocationid AS w__wptlocationid, w.wptlocation AS w__wptlocation, w.wptresultid AS w__wptresultid, w.wptresultxmllocation AS w__wptresultxmllocation, w.status AS w__status, w.downloadresultxml AS w__downloadresultxml, w.downloaddetails AS w__downloaddetails, w.maxdownloadattempts AS w__maxdownloadattempts, w.downloadattempts AS w__downloadattempts, w.runs AS w__runs, w.runtouseforaverage AS w__runtouseforaverage, w.firststatusupdate AS w__firststatusupdate, w.laststatusupdate AS w__laststatusupdate, w.avgfirstviewloadtime AS w__avgfirstviewloadtime, w.avgfirstviewfirstbyte AS w__avgfirstviewfirstbyte, w.avgfirstviewstartrender AS w__avgfirstviewstartrender, w.avgfirstviewdoccompletetime AS w__avgfirstviewdoccompletetime, w.avgfirstviewdoccompleterequests AS w__avgfirstviewdoccompleterequests, w.avgfirstviewdoccompletebytesin AS w__avgfirstviewdoccompletebytesin, w.avgfirstviewdomtime AS w__avgfirstviewdomtime, w.avgfirstviewfullyloadedtime AS w__avgfirstviewfullyloadedtime, w.avgfirstviewfullyloadedrequests AS w__avgfirstviewfullyloadedrequests, w.avgfirstviewfullyloadedbytesin AS w__avgfirstviewfullyloadedbytesin, w.avgrepeatviewloadtime AS w__avgrepeatviewloadtime, w.avgrepeatviewfirstbyte AS w__avgrepeatviewfirstbyte, w.avgrepeatviewstartrender AS w__avgrepeatviewstartrender, w.avgrepeatviewdoccompletetime AS w__avgrepeatviewdoccompletetime, w.avgrepeatviewdoccompleterequests AS w__avgrepeatviewdoccompleterequests, w.avgrepeatviewdoccompletebytesin AS w__avgrepeatviewdoccompletebytesin, w.avgrepeatviewdomtime AS w__avgrepeatviewdomtime, w.avgrepeatviewfullyloadedtime AS w__avgrepeatviewfullyloadedtime, w.avgrepeatviewfullyloadedrequests AS w__avgrepeatviewfullyloadedrequests, w.avgrepeatviewfullyloadedbytesin AS w__avgrepeatviewfullyloadedbytesin, w.wptbandwidthdown AS w__wptbandwidthdown, w.wptbandwidthup AS w__wptbandwidthup, w.wptbandwidthlatency AS w__wptbandwidthlatency, w.wptbandwidthpacketloss AS w__wptbandwidthpacketloss, w2.id AS w2__id, w2.userid AS w2__userid, w2.wptjobfolderid AS w2__wptjobfolderid, w2.wptscriptid AS w2__wptscriptid, w2.active AS w2__active, w2.label AS w2__label, w2.description AS w2__description, w2.url AS w2__url, w2.urlscript AS w2__urlscript, w2.navigationscript AS w2__navigationscript, w2.primerequest AS w2__primerequest, w2.host AS w2__host, w2.location AS w2__location, w2.firstviewonly AS w2__firstviewonly, w2.video AS w2__video, w2.downloadresultxml AS w2__downloadresultxml, w2.downloaddetails AS w2__downloaddetails, w2.frequency AS w2__frequency, w2.maxdownloadattempts AS w2__maxdownloadattempts, w2.runs AS w2__runs, w2.runtouseforaverage AS w2__runtouseforaverage, w2.lastrun AS w2__lastrun, w2.wptbandwidthdown AS w2__wptbandwidthdown, w2.wptbandwidthup AS w2__wptbandwidthup, w2.wptbandwidthlatency AS w2__wptbandwidthlatency, w2.wptbandwidthpacketloss AS w2__wptbandwidthpacketloss FROM WPTResult w LEFT JOIN WPTJob w2 ON w.wptjobid = w2.id LEFT JOIN WPTJob w3 ON w.wptjobid = w3.id WHERE (w3.userid = ? AND w.date < ? AND w.date > ?) ORDER BY w.wptresultid LIMIT 15"

Artur Sudnik
Find all posts by this user
Quote this message in a reply
02-03-2012, 02:38 AM
Post: #4
RE: 979 revision upgrade problems
In the migrations directory, try removing all the files except for the one that starts with 10_

Then run migrate again and see if that helps.

Tony Perkins
Find all posts by this user
Quote this message in a reply
02-04-2012, 01:14 AM
Post: #5
RE: 979 revision upgrade problems
Tried it and didn't helped.

Artur Sudnik
Find all posts by this user
Quote this message in a reply
02-04-2012, 03:21 AM
Post: #6
RE: 979 revision upgrade problems
Try changing the 10_ to 11_ and run migrate again. It may be that it updated the migration level and now expects to start at 11.

Tony Perkins
Find all posts by this user
Quote this message in a reply
02-07-2012, 07:34 PM
Post: #7
RE: 979 revision upgrade problems
Tony,

I did as you suggested:

Run:
GenerateTables.php
migrate.php (got errors)
removed all scripts from migrations folder except 10_WPTResultTable_add_columns_to_support_sequences and renamed it to 11_WPTResultTable_add_columns_to_support_sequences
run migrate.php again (got no errors)

After that reports tab shows no results, at results tab I got error:
Exception : SQLSTATE[HY000]: General error: 1 no such column: w.wptlocation. Failing Query: "SELECT w.id AS w__id, w.date AS w__date, w.wptjobid AS w__wptjobid, w.sequencenumber AS w__sequencenumber, w.urlscript AS w__urlscript, w.wpteventname AS w__wpteventname, w.wptpagetitle AS w__wptpagetitle, w.timetoloadtitle AS w__timetoloadtitle, w.timetoloadtitlerepeatview AS w__timetoloadtitlerepeatview, w.multistep AS w__multistep, w.validate AS w__validate, w.validationrequest AS w__validationrequest, w.validationtype AS w__validationtype, w.validationmarkas AS w__validationmarkas, w.validationmarkaselse AS w__validationmarkaselse, w.validationstate AS w__validationstate, w.dialerid AS w__dialerid, w.runlabel AS w__runlabel, w.wpthost AS w__wpthost, w.wptlocationid AS w__wptlocationid, w.wptlocation AS w__wptlocation, w.wptresultid AS w__wptresultid, w.wptresultxmllocation AS w__wptresultxmllocation, w.status AS w__status, w.downloadresultxml AS w__downloadresultxml, w.downloaddetails AS w__downloaddetails, w.maxdownloadattempts AS w__maxdownloadattempts, w.downloadattempts AS w__downloadattempts, w.runs AS w__runs, w.runtouseforaverage AS w__runtouseforaverage, w.firststatusupdate AS w__firststatusupdate, w.laststatusupdate AS w__laststatusupdate, w.avgfirstviewloadtime AS w__avgfirstviewloadtime, w.avgfirstviewfirstbyte AS w__avgfirstviewfirstbyte, w.avgfirstviewstartrender AS w__avgfirstviewstartrender, w.avgfirstviewdoccompletetime AS w__avgfirstviewdoccompletetime, w.avgfirstviewdoccompleterequests AS w__avgfirstviewdoccompleterequests, w.avgfirstviewdoccompletebytesin AS w__avgfirstviewdoccompletebytesin, w.avgfirstviewdomtime AS w__avgfirstviewdomtime, w.avgfirstviewfullyloadedtime AS w__avgfirstviewfullyloadedtime, w.avgfirstviewfullyloadedrequests AS w__avgfirstviewfullyloadedrequests, w.avgfirstviewfullyloadedbytesin AS w__avgfirstviewfullyloadedbytesin, w.avgrepeatviewloadtime AS w__avgrepeatviewloadtime, w.avgrepeatviewfirstbyte AS w__avgrepeatviewfirstbyte, w.avgrepeatviewstartrender AS w__avgrepeatviewstartrender, w.avgrepeatviewdoccompletetime AS w__avgrepeatviewdoccompletetime, w.avgrepeatviewdoccompleterequests AS w__avgrepeatviewdoccompleterequests, w.avgrepeatviewdoccompletebytesin AS w__avgrepeatviewdoccompletebytesin, w.avgrepeatviewdomtime AS w__avgrepeatviewdomtime, w.avgrepeatviewfullyloadedtime AS w__avgrepeatviewfullyloadedtime, w.avgrepeatviewfullyloadedrequests AS w__avgrepeatviewfullyloadedrequests, w.avgrepeatviewfullyloadedbytesin AS w__avgrepeatviewfullyloadedbytesin, w.wptbandwidthdown AS w__wptbandwidthdown, w.wptbandwidthup AS w__wptbandwidthup, w.wptbandwidthlatency AS w__wptbandwidthlatency, w.wptbandwidthpacketloss AS w__wptbandwidthpacketloss, w2.id AS w2__id, w2.userid AS w2__userid, w2.wptjobfolderid AS w2__wptjobfolderid, w2.wptscriptid AS w2__wptscriptid, w2.active AS w2__active, w2.label AS w2__label, w2.description AS w2__description, w2.url AS w2__url, w2.urlscript AS w2__urlscript, w2.navigationscript AS w2__navigationscript, w2.primerequest AS w2__primerequest, w2.host AS w2__host, w2.location AS w2__location, w2.firstviewonly AS w2__firstviewonly, w2.video AS w2__video, w2.downloadresultxml AS w2__downloadresultxml, w2.downloaddetails AS w2__downloaddetails, w2.frequency AS w2__frequency, w2.maxdownloadattempts AS w2__maxdownloadattempts, w2.runs AS w2__runs, w2.runtouseforaverage AS w2__runtouseforaverage, w2.lastrun AS w2__lastrun, w2.wptbandwidthdown AS w2__wptbandwidthdown, w2.wptbandwidthup AS w2__wptbandwidthup, w2.wptbandwidthlatency AS w2__wptbandwidthlatency, w2.wptbandwidthpacketloss AS w2__wptbandwidthpacketloss FROM WPTResult w LEFT JOIN WPTJob w2 ON w.wptjobid = w2.id LEFT JOIN WPTJob w3 ON w.wptjobid = w3.id WHERE (w3.userid = ? AND w.date < ? AND w.date > ?) ORDER BY w.wptresultid LIMIT 15"

Artur Sudnik
Find all posts by this user
Quote this message in a reply
02-10-2012, 08:44 AM
Post: #8
RE: 979 revision upgrade problems
Can you try doing a clean install, in a different location so you don't lose any data. I'll review my migration scripts to see what I may have missed. I apologize for the inconvenience.

Tony Perkins
Find all posts by this user
Quote this message in a reply
08-11-2012, 11:18 PM (This post was last modified: 08-11-2012 11:19 PM by sabreB6.)
Post: #9
RE: 979 revision upgrade problems
Hey!
I experience exactly same problem, I'm migrating from 0.2.1.1 to Trunk I had some problems with 'migrations/' but removed 1-3 scripts and now when I run migrate.php I get "

Quote:[Sat Aug 11 13:08:13 2012] [error] [client 83.4.58.170] PHP Fatal error: Uncaught exception 'Doctrine_Migration_Exception' with message '1 error(s) encountered during migration\n=======================================\n Error #1 - Already at version # 8\n#0 /mnt_wpt/www/webpagetest/wptmonitor_trunk/lib/vendor/doctrine/Doctrine/Migration.php(328): Doctrine_Migration->_doMigrate(8)\n#1 /mnt_wpt/www/webpagetest/wptmonitor_trunk/migrate.php(5): Doctrine_Migration->migrate()\n#2 {main}\n' in /mnt_wpt/www/webpagetest/wptmonitor_trunk/lib/vendor/doctrine/Doctrine/Migration.php:457\nStack trace:\n#0 /mnt_wpt/www/webpagetest/wptmonitor_trunk/lib/vendor/doctrine/Doctrine/Migration.php(339): Doctrine_Migration->_throwErrorsException()\n#1 /mnt_wpt/www/webpagetest/wptmonitor_trunk/migrate.php(5): Doctrine_Migration->migrate()\n#2 {main}\n thrown in /mnt_wpt/www/webpagetest/wptmonitor_trunk/lib/vendor/doctrine/Doctrine/Migration.php on line 457

So I guess I'm up to date.

I was executing GenerateTables.php and didn't see any errors however I keep getting this error when listing jobs/results:

Quote:[Sat Aug 11 13:09:56 2012] [error] [client 83.4.58.170] [WPTMonitor] Failed while Listing jobs: NULL message: SQLSTATE[HY000]: General error: 1 no such column: w.wptlocation. Failing Query: "SELECT w.id AS w__id, w.date AS w__date, w.wptjobid AS w__wptjobid, w.sequencenumber AS w__sequencenumber, w.urlscript AS w__urlscript, w.wpteventname AS w__wpteventname, w.wptpagetitle AS w__wptpagetitle, w.timetoloadtitle AS w__timetoloadtitle, w.timetoloadtitlerepeatview AS w__timetoloadtitlerepeatview, w.multistep AS w__multistep, w.validate AS w__validate, w.validationrequest AS w__validationrequest, w.validationtype AS w__validationtype, w.validationmarkas AS w__validationmarkas, w.validationmarkaselse AS w__validationmarkaselse, w.validationstate AS w__validationstate, w.dialerid AS w__dialerid, w.runlabel AS w__runlabel, w.wpthost AS w__wpthost, w.wptlocationid AS w__wptlocationid, w.wptlocation AS w__wptlocation, w.wptresultid AS w__wptresultid, w.wptresultxmllocation AS w__wptresultxmllocation, w.status AS w__status, w.downloadresultxml AS w__downloadresultxml, w.downloaddetails AS w__downloaddetails, w.maxdownloadattempts AS w__maxdownloadattempts, w.downloadattempts AS w__downloadattempts, w.runs AS w__runs, w.runtouseforaverage AS w__runtouseforaverage, w.firststatusupdate AS w__firststatusupdate, w.laststatusupdate AS w__laststatusupdate, w.avgfirstviewloadtime AS w__avgfirstviewloadtime, w.avgfirstviewfirstbyte AS w__avgfirstviewfirstbyte, w.avgfirstviewstartrender AS w__avgfirstviewstartrender, w.avgfirstviewdoccompletetime AS w__avgfirstviewdoccompletetime, w.avgfirstviewdoccompleterequests AS w__avgfirstviewdoccompleterequests, w.avgfirstviewdoccompletebytesin AS w__avgfirstviewdoccompletebytesin, w.avgfirstviewdomtime AS w__avgfirstviewdomtime, w.avgfirstviewfullyloadedtime AS w__avgfirstviewfullyloadedtime, w.avgfirstviewfullyloadedrequests AS w__avgfirstviewfullyloadedrequests, w.avgfirstviewfullyloadedbytesin AS w__avgfirstviewfullyloadedbytesin, w.avgrepeatviewloadtime AS w__avgrepeatviewloadtime, w.avgrepeatviewfirstbyte AS w__avgrepeatviewfirstbyte, w.avgrepeatviewstartrender AS w__avgrepeatviewstartrender, w.avgrepeatviewdoccompletetime AS w__avgrepeatviewdoccompletetime, w.avgrepeatviewdoccompleterequests AS w__avgrepeatviewdoccompleterequests, w.avgrepeatviewdoccompletebytesin AS w__avgrepeatviewdoccompletebytesin, w.avgrepeatviewdomtime AS w__avgrepeatviewdomtime, w.avgrepeatviewfullyloadedtime AS w__avgrepeatviewfullyloadedtime, w.avgrepeatviewfullyloadedrequests AS w__avgrepeatviewfullyloadedrequests, w.avgrepeatviewfullyloadedbytesin AS w__avgrepeatviewfullyloadedbytesin, w.wptbandwidthdown AS w__wptbandwidthdown, w.wptbandwidthup AS w__wptbandwidthup, w.wptbandwidthlatency AS w__wptbandwidthlatency, w.wptbandwidthpacketloss AS w__wptbandwidthpacketloss, w2.id AS w2__id, w2.userid AS w2__userid, w2.wptjobfolderid AS w2__wptjobfolderid, w2.wptscriptid AS w2__wptscriptid, w2.active AS w2__active, w2.label AS w2__label, w2.description AS w2__description, w2.url AS w2__url, w2.urlscript AS w2__urlscript, w2.navigationscript AS w2__navigationscript, w2.primerequest AS w2__primerequest, w2.host AS w2__host, w2.location AS w2__location, w2.firstviewonly AS w2__firstviewonly, w2.video AS w2__video, w2.downloadresultxml AS w2__downloadresultxml, w2.downloaddetails AS w2__downloaddetails, w2.frequency AS w2__frequency, w2.maxdownloadattempts AS w2__maxdownloadattempts, w2.runs AS w2__runs, w2.runtouseforaverage AS w2__runtouseforaverage, w2.lastrun AS w2__lastrun, w2.wptbandwidthdown AS w2__wptbandwidthdown, w2.wptbandwidthup AS w2__wptbandwidthup, w2.wptbandwidthlatency AS w2__wptbandwidthlatency, w2.wptbandwidthpacketloss AS w2__wptbandwidthpacketloss FROM WPTResult w LEFT JOIN WPTJob w2 ON w.wptjobid = w2.id LEFT JOIN WPTJob w3 ON w.wptjobid = w3.id WHERE (w3.userid = ? AND w3.id = ? AND w.date < ? AND w.date > ?) ORDER BY w.wptresultid LIMIT 100",

I can see that models/WPTResult.php has this:

Quote:public function setUp()
{
$this->hasOne( 'WPTJob', array(
'local' => 'WPTJobId',
'foreign' => 'Id'
)
);
$this->hasOne( 'WPTLocation', array(
'local' => 'WPTLocationId',
'foreign' => 'Id'
)
);

It looks like 'WPTLocation' is Associated with 'WPTLocationId' Igues it's same story in other models.

I'm not familiar with Doctrine and createTablesFromModels('models'); function.

I wonder what does happen when I import old database and then call createTablesFromModels?

Any idea how to fix WPTLocation issue?

Regards.
Find all posts by this user
Quote this message in a reply
08-16-2012, 11:38 PM
Post: #10
RE: 979 revision upgrade problems
What you might try is... create a new install in a temporary location, then compare the tables from the new install to the existing install and see which column(s) is missing. If you manually create the missing column it should resolve this issue.

Tony Perkins
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)