migration cmd line phpBB 3.0 to 3.1

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
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.
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

migration cmd line phpBB 3.0 to 3.1

Post by Neuropass »

Hi,

dont understand how to migrate from the cmd line:

Code: Select all

php ./bin/phpbbcli.php db:migrate --safe-mode

can I ask for a bit more guidance?


how do I specify the DB to upgrade, folder etc? That is what confuses me :-/
Last edited by Neuropass on Thu Oct 29, 2015 8:42 pm, edited 1 time in total.
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: migration cmd line phpBB 3.0 to 3.1

Post by Oyabun1 »

What is a "DP"?
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: migration cmd line phpBB 3.0 to 3.1

Post by Neuropass »

typo, I meant DB database.
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: migration cmd line phpBB 3.0 to 3.1

Post by Oyabun1 »

You need to navigate to the board root with your command line client before running the command or else modify the ./bin/phpbbcli.php relative path so that it is to that file in the board you wish to update.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: migration cmd line phpBB 3.0 to 3.1

Post by Neuropass »

Thanks I managed to run the upgrade. Should it give you a success message when finished?

because all I see is this as last lines:

Code: Select all

Installed Data: \phpbb\db\migration\data\v310\notification_options_reconvert; Time: 0.24 seconds
Installed Data: \phpbb\db\migration\data\v310\notification_options_reconvert; Time: 0.22 seconds
Installed Schema: \phpbb\db\migration\data\v310\plupload; Time: 0.00 seconds
Installed Data: \phpbb\db\migration\data\v310\plupload; Time: 0.00 seconds

I see the forum is running on the front-end but the topics and posts are all at 0

I tried logging in into the admin panel and I get this:

Code: Select all

General Error
SQL ERROR [ mysqli ]

Data too long for column 'user_password' at row 1 [1406]

SQL

UPDATE phpbb33_users SET user_password = '$2y$10$RmefgEJmR0fl48e/LLs/ROR32Inz84/khVHOnAWqksbG2jYaydR22' WHERE user_id = 118964

BACKTRACE

What happened? What should I do now?

Please advice.
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: migration cmd line phpBB 3.0 to 3.1

Post by Oyabun1 »

Neuropass wrote:Thanks I managed to run the upgrade. Should it give you a success message when finished?
Yes, it should give the output "Database updater has completed!"

The database has not been correctly updated. Try running the command again.

If that doesn't work then truncate the migrations table. An SQL query like

Code: Select all

TRUNCATE TABLE phpbb_migrations
can be used. Change phpbb_ if that is not your table prefix.

Then run the migrate command again.

Note that the CLI command is only for updating the database, not the files.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: migration cmd line phpBB 3.0 to 3.1

Post by Neuropass »

Ok at last it went trough! Thank-you!

Now one issue left I can see , the post and topic count is 0. :o

I see they are in the DB. Re-synch from acp doesn't do anything.

Is there a query I can run to re-index all the posts correctly?


EDIT:

Looks like all the post are under the quee. Hows that possible? is it a known bug for the migration?
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: migration cmd line phpBB 3.0 to 3.1

Post by Oyabun1 »

The database still hasn't been updated correctly. Truncate the migrations table and try it again.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: migration cmd line phpBB 3.0 to 3.1

Post by Neuropass »

I did try again, and i received the successful message. Post and topics are all in queue for each users and shows 0 in the board. I tried re-sync and doesnt work.

Isn't there a query or cmd line option to re-calculate posts and topics with the users IDs ? I would think this would be a common and useful operation?
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: migration cmd line phpBB 3.0 to 3.1

Post by Oyabun1 »

Neuropass wrote:Isn't there a query or cmd line option to re-calculate posts and topics with the users IDs ?
Yes that is what resynchronising does. Posts waiting for approval are not supposed to be included in the count, so if all you posts are in the queue then none are counted.

Have a look at the posts table in the database and see if there is a post_approved column and/or a post_visibility column.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: migration cmd line phpBB 3.0 to 3.1

Post by Neuropass »

There is a post visibility and its value is 0 for everything. what should I do?
From MCP:

Code: Select all

In total there are 426784 posts waiting for approval.
Please help I'm desperate at this point. :-/ I dont understand why the update said it was successful and then all the posts were sent into a queue.

From ACP stats, shows 0 topics and 0 posts as well. :-[

But they are all there.
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: migration cmd line phpBB 3.0 to 3.1

Post by Oyabun1 »

Oyabun1 wrote:Have a look at the posts table in the database and see if there is a post_approved column and/or a post_visibility column.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: migration cmd line phpBB 3.0 to 3.1

Post by Neuropass »

Only post_visibility. There is no post_approved column.
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: migration cmd line phpBB 3.0 to 3.1

Post by Oyabun1 »

Check for topic_visibility and topic_approved in the topics table. If only topic_visibility exists then run this query

Code: Select all

UPDATE phpbb_posts SET post_visibility = 1;
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: migration cmd line phpBB 3.0 to 3.1

Post by Neuropass »

Ok that's helping, thank-you. I would still need a query to re-synch all the posts and topics now becuase ACP options keeps failing. I'm honestly surprised to see that this is not part of the cmd line. I see many topics around here that have failed with the ACP synch and left the board broken. Especially considering this happened becuase of the converter script shipped with phpBB 3.1.6 which is clearly not able to handle the process for a large board.
Locked

Return to “[3.1.x] Support Forum”