Database upgrade didn't complete, 3.0.12 to 3.1.2

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
CentaurAtlas
Registered User
Posts: 50
Joined: Sun Dec 02, 2007 5:39 pm
Contact:

Database upgrade didn't complete, 3.0.12 to 3.1.2

Post by CentaurAtlas »

Hi,
I did do the upgrade from 3.0.12 to 3.1.2, but the server timed out during the database_upgrade.php section. I did a quick restore of the DB from the backup and now have two fully copies of the DB, both at 3.0.12. One is still running and I am going to mess with the second one for the conversion. One is in /forums/, the other /forums-3.1.2/

On this page (viewtopic.php?f=466&t=2269196) it seems to say to download the migrator.php file, but I believe that is already included with 3.1.2, since the files are identical, so I don't think that will help.

A couple of questions about getting this done:

1. What is the current recommendation for getting past the timeout? (It is a rather large conversion). Rackspace suggested running it from a cron job which has a 15 minute timeout which is longer than the timeout from the web page. That did not work since you have to keep selecting pages to continue.

2. Can I somehow manually apply the DB upgrade steps if I get the timeout?

3. If I just keep running the database_upgrade.php, will it just keep resuming from where it left off? (I can run it repeatedly from the web site or using cron with a shell command for a longer timeout.)

A few notes:
PHP Version 5.4.10, so it should be okay (since it needs 5.3.3 - viewtopic.php?f=14&t=2152375). (On Rackspace cloud, so can't upgrade myself, that is the current version for them - I am sure before Sept 2015, they'll make 5.5 or 5.6 available).

Thanks for any tips or suggestions!

p.s. On this page:
https://www.phpbb.com/support/docs/en/3 ... /upgrade3/
step 4, should include the warning ("(EXCEPT for config.php) into your forum's directory.)" as it does on this page, item II.6 (FAQ):

viewtopic.php?f=466&t=2232411
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Database upgrade didn't complete, 3.0.12 to 3.1.2

Post by Oyabun1 »

CentaurAtlas wrote:3. If I just keep running the database_upgrade.php, will it just keep resuming from where it left off?
It should, since migrations are tracked in the database.

The upgrade adds new tables to the database, such as the migrations table, which will not be dropped with a normal database restore. If you want to make sure you are doing a full restore you need to drop all the tables and then do the restore.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
CentaurAtlas
Registered User
Posts: 50
Joined: Sun Dec 02, 2007 5:39 pm
Contact:

Re: Database upgrade didn't complete, 3.0.12 to 3.1.2

Post by CentaurAtlas »

Oyabun1 wrote:
CentaurAtlas wrote:3. If I just keep running the database_upgrade.php, will it just keep resuming from where it left off?
It should, since migrations are tracked in the database.

The upgrade adds new tables to the database, such as the migrations table, which will not be dropped with a normal database restore. If you want to make sure you are doing a full restore you need to drop all the tables and then do the restore.
Thanks for the reply - when I did the restore, I dropped everything, but good advice!

I'll give the repeated running a try and see what happens!
CentaurAtlas
Registered User
Posts: 50
Joined: Sun Dec 02, 2007 5:39 pm
Contact:

Re: Database upgrade didn't complete, 3.0.12 to 3.1.2

Post by CentaurAtlas »

I tried it, and kept getting error like the one below, but kept hitting reload and it appears that it did finally work. I've been testing it - reading, posting, installed a theme etc - and it looks like it made it. Fingers crossed.

Thanks for the help!



---------------
Database type :: mysqli
Previous version :: 3.1.0-dev
Installing Schema: \phpbb\db\migration\data\v310\mysql_fulltext_drop.
SQL ERROR [ mysqli ]

Can't DROP 'post_subject'; check that column/key exists [1091]

SQL

DROP INDEX post_subject ON phpbb_posts

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 194
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/db/tools.php
LINE: 1428
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/db/tools.php
LINE: 1960
CALL: phpbb\db\tools->_sql_run_sql()

FILE: [ROOT]/phpbb/db/tools.php
LINE: 837
CALL: phpbb\db\tools->sql_index_drop()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\tools->perform_schema_changes()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 517
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 463
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 284
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 181
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/install/database_update.php
LINE: 208
CALL: phpbb\db\migrator->update()
User avatar
Puchahawa
Registered User
Posts: 769
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: Database upgrade didn't complete, 3.0.12 to 3.1.2

Post by Puchahawa »

CentaurAtlas wrote:I tried it, and kept getting error like the one below, but kept hitting reload and it appears that it did finally work. I've been testing it - reading, posting, installed a theme etc - and it looks like it made it. Fingers crossed.

Thanks for the help!

---------------
Database type :: mysqli
Previous version :: 3.1.0-dev
Installing Schema: \phpbb\db\migration\data\v310\mysql_fulltext_drop.
SQL ERROR [ mysqli ]

Can't DROP 'post_subject'; check that column/key exists [1091]
I had the same error show up when I updated from 3.0.12 to 3.1.2 on a local board. Your choice to keep hitting the refresh button on your browser worked. It took several times before the error went away and the update continued with no problems. The board works fine.

A fellow admin and I are testing on local boards before doing a live update and so we tested again. This time we removed all the styles other than prosilver, removed ALL mods, and deleted the search data. The result was a flawless update to the DB, and that on a board with over 1.1 million posts.
Avatar courtesy of artist Faith Coyotë
CentaurAtlas
Registered User
Posts: 50
Joined: Sun Dec 02, 2007 5:39 pm
Contact:

Re: Database upgrade didn't complete, 3.0.12 to 3.1.2

Post by CentaurAtlas »

I thought it was working, but now I'm getting
Uncaught exception 'Twig_Error_Loader' with message 'There are no registered paths for namespace
I'm not sure how to fix it yet.

:-)

EDIT:
What I ended up doing was, essentially, deleting everything in the "cache" folder. That seemed to fix the issue. I did try enabling an extension, then disabling it which seemed to have caused it.
User avatar
Lumpy Burgertushie
Registered User
Posts: 68297
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Database upgrade didn't complete, 3.0.12 to 3.1.2

Post by Lumpy Burgertushie »

anytime you disable an extension and then want to re enable it, you should delete the data first. then you can enable it again.

also, you should always purge the cache after making any changes to the board.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Locked

Return to “[3.1.x] Support Forum”