Announcement

#1 2017-11-10 05:33:10

redhorse
Member
2017-11-10
6

Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

Hi,

I just completed a migration to a new server with a fresh install of Piwigo 2.9.2 (old server had 2.7.1).  I followed the instructions for the manual upgrade, except for the list of directories to preserve (I saw these instructions after my migration attempt).  I only copied the '_data' and 'upload' directories.  I manually exported/imported the data base using phpMyAdmin. 

I went to my piwigo url and entered the information for the database and upon submitting, the home page came up just like on my old site, except for a MySQL error about "Unknown column 'last_visit'"

Next, I used the update.php page with no errors reported, though it completed the task very quickly, as if nothing was done.  Back on the home page, the MySQL error was still there.

I resolved this error using instructions from this post.

Now everything looks good.  Except when I log out I get another MySQL error:

Code:

Warning:  [mysql error 1054] Unknown column 'format_id' in 'field list'

INSERT INTO piwigo_history
  (
    date,
    time,
    user_id,
    IP,
    section,
    category_id,
    image_id,
    image_type,
    format_id,
    auth_key_id,
    tag_ids
  )
  VALUES
  (
    CURRENT_DATE,
    CURRENT_TIME,
    2,
    '127.0.0.1',
    'categories',
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL
  )
; in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 845

I tried copying the folders listed in the manual upgrade instructions from my old server to the new one, but the problem is still there and upgrade.php doesn't appear to do much of anything.

This leads me to believe that I probably have other as yet unseen data base issues.  Is there some way I can force the data base patch scripts in /install/db to run and do all the appropriate updates?

Would I be better off starting over with a new, clean install and doing something differently?

Piwigo version: 2.9.2
PHP version: 7.1.8
MySQL version: 5.7.20
OS: Ubuntu 17.10
Piwigo URL: This installation is on my private LAN, where I'm the only user.

Offline

 

#2 2017-11-10 09:44:56

eliz82
Member
Romania
2016-04-27
281

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

redhorse wrote:

Would I be better off starting over with a new, clean install and doing something differently?

You can try smaller version jumps 2.7.1 > 2.7.4 > 2.8.6 > 2.9.2

Even WordPress has this problem.

Offline

 

#3 2017-11-10 15:50:35

flop25
Piwigo Team
2006-07-06
7037

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

Hello
in your database, table "**__upgrade" what's the highest id ?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2017-11-11 00:08:58

redhorse
Member
2017-11-10
6

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

124

flop25 wrote:

Hello
in your database, table "**__upgrade" what's the highest id ?

Offline

 

#5 2017-11-11 18:22:39

redhorse
Member
2017-11-10
6

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

Thanks.  I'll try that if there aren't any suggestions on getting my current install to work.

eliz82 wrote:

redhorse wrote:

Would I be better off starting over with a new, clean install and doing something differently?

You can try smaller version jumps 2.7.1 > 2.7.4 > 2.8.6 > 2.9.2

Even WordPress has this problem.

Offline

 

#6 2017-11-11 19:56:15

eliz82
Member
Romania
2016-04-27
281

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

now I see u have php 7.1 ... bad luck then. you should have updated piwigo first then update php.

you can try to install a webserver on your personal computer (like wamp) => install your piwigo backup => update piwigo to 2.9.2 => move the piwigo on you internet host

Offline

 

#7 2017-11-11 20:08:29

redhorse
Member
2017-11-10
6

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

It's all on my local network.  I have physical access to all machines.  So I can do whatever it takes without much effort.

Perhaps if I upgrade piwigo on my old server before migrating the database to the new one it might work better.

eliz82 wrote:

now I see u have php 7.1 ... bad luck then. you should have updated piwigo first then update php.

you can try to install a webserver on your personal computer (like wamp) => install your piwigo backup => update piwigo to 2.9.2 => move the piwigo on you internet host

Offline

 

#8 2017-11-11 20:20:18

eliz82
Member
Romania
2016-04-27
281

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

redhorse wrote:

Perhaps if I upgrade piwigo on my old server before migrating the database to the new one it might work better.

of course. make a backup first on the old server. try to update on smaller steps on older server (php 5.x). then move piwigo 2.9 to php 7.1

Offline

 

#9 2017-11-11 20:41:14

redhorse
Member
2017-11-10
6

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

Thanks for giving me an idea.  I got it working.

1. On my OLD server, I backed up everything in the piwigo directory (images and database already backed up), just in case the upgrade might break my old server too.
2. On my OLD server, I clicked the update link which updated the installation to 2.9.2
3. On my OLD server, I exported the database
4. On my NEW server in phpmyadmin, I dropped all the tables from the existing (version misaligned) piwigo database
5. On my NEW server, I imported the database I exported from my OLD server
6. My new Piwigo installation now works perfectly.

eliz82 wrote:

now I see u have php 7.1 ... bad luck then. you should have updated piwigo first then update php.

you can try to install a webserver on your personal computer (like wamp) => install your piwigo backup => update piwigo to 2.9.2 => move the piwigo on you internet host

Offline

 

#10 2017-11-12 16:59:09

flop25
Piwigo Team
2006-07-06
7037

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

Great news
I just recommend you to avoid using 7.1 (for extensions mainly) and stay with 7.0.x if you can


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#11 2017-11-15 04:42:45

redhorse
Member
2017-11-10
6

Re: Data base not upgraded when manually migrating from 2.7.1 to 2.9.2

Thanks.  I'm not using any extensions, so I'll see how it goes with 7.1.  If I run into any issues, I'll try to downgrade PHP (not the easiest thing to do with Ubuntu...).

flop25 wrote:

Great news
I just recommend you to avoid using 7.1 (for extensions mainly) and stay with 7.0.x if you can

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact