Upgrade from 1.3.1 to 2.5 fails with [wrapped: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'digital_object.OBJECT_ID' in 'field list']

44 views
Skip to first unread message

Martin Longo

unread,
May 6, 2020, 5:22:07 PM5/6/20
to AtoM Users
Hello to all 

I'm trying to upgrade an icaatom 1.3.1 installation to 2.5.4
The installation process of the new system went without problems, but after running

$sudo  php symfony tools:upgrade-sql

from atom's directory, (and after selecting the theme and confirming that I've made the database backup), I get:

[wrapped: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'digital_object.OBJECT_ID' in 'field list']

Does someone know how can I fix this problem?

The system I am working on is Ubuntu 18.04.4 LTS

Thanks in advance

Dan Gillean

unread,
May 6, 2020, 5:58:02 PM5/6/20
to ICA-AtoM Users
Hi Martin, 

Did you remember to drop and recreate the database, per step 3 of this section of the Upgrading documentation, before loading your backup?

Even if so, the first thing I would recommend would be trying this again, as follows: 

First, make sure you still have a copy of your backup! We're going to purge the current database, so any data currently loaded will be lost. 

Next, let's try dropping and recreating the database: 
  • mysql -u username -p -e 'drop database atom; create database atom character set utf8 collate utf8_unicode_ci;'
Make sure to swap in your correct MySQL username. I've added "atom" as the database name here, but change this as well if you've used something else. 

Next, let's try running the purge task, from AtoM's root installation directory: 
  • php symfony tools:purge
This task will purge all data, and then walk you through adding the site information and an administrator user account. 

After this, try loading the ICA-AtoM database again, running the upgrade task, and continuing with the instructions from there. 

The one other recommendation I would have, which I don't think is causing this issue but may prevent other problems later, is to avoid running the AtoM command-line tasks as sudo. AtoM assigns all permissions to the www-data user, so you can always run AtoM command-line tasks like so, if needed: 
  • sudo -u www-data php symfony tools:upgrade-sql
  • etc.
If you want to make sure that the filesystem permissions are still properly assigned throughout AtoM, you can run the following: 
  • sudo chown -R www-data:www-data /usr/share/nginx/atom
Additionally, you might want to make sure you've installed the correct MySQL version - with Ubuntu 18.04 we recommend mysql-server-5.7

Let us know if this helps! If not, I will follow up with our team and see what further suggestions they might have for you. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/8cd1a3b0-f1ad-4477-b846-812316894c57%40googlegroups.com.

Martin Longo

unread,
May 8, 2020, 4:48:23 PM5/8/20
to ica-ato...@googlegroups.com
Hello Dan ... Thanks for your response...

The steps you suggested:

mysql -u username -p -e 'drop database atom; create database atom character set utf8 collate utf8_unicode_ci;'
php symfony tools:purge 
(load old_atom databas)
php symfony tools:upgrade-sql

Did not solve the problem. I still get the same "[wrapped: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'digital_object.OBJECT_ID' in 'field list']" error ...

I've checked the digital_object table in my "old_atom" database and, in fact, it lacks the 'object_id' column... I went bold and created it and then the php symfony tools:upgrade-sql task completed successfully ...  BUT ... once into the new system, I can see the migrated users, subjects and places, while the  archival descriptions, information objects, actors are missing and the count of digital objects was (no surprise there) 0 ...

I went even bolder and duplicated the column "information_object_id" as "object_id" just to see what would happen ... with the same result :(

This is the structure of my IcaAtom 1.3.1's digital_object table

mysql> describe digital_object;
+-----------------------+---------------+------+-----+---------+-------+
| Field                 | Type          | Null | Key | Default | Extra |
+-----------------------+---------------+------+-----+---------+-------+
| id                    | int(11)       | NO   | PRI | NULL    |       |
| information_object_id | int(11)       | YES  | MUL | NULL    |       |
| usage_id              | int(11)       | YES  | MUL | NULL    |       |
| mime_type             | varchar(255)  | YES  |     | NULL    |       |
| media_type_id         | int(11)       | YES  | MUL | NULL    |       |
| name                  | varchar(1024) | NO   |     | NULL    |       |
| path                  | varchar(1024) | NO   |     | NULL    |       |
| sequence              | int(11)       | YES  |     | NULL    |       |
| byte_size             | int(11)       | YES  |     | NULL    |       |
| checksum              | varchar(255)  | YES  |     | NULL    |       |
| checksum_type         | varchar(50)   | YES  |     | NULL    |       |
| parent_id             | int(11)       | YES  | MUL | NULL    |       |
| lft                   | int(11)       | NO   |     | NULL    |       |
| rgt                   | int(11)       | NO   |     | NULL    |       |
+-----------------------+---------------+------+-----+---------+-------+
14 rows in set (0.00 sec)


Martin Longo

unread,
May 8, 2020, 6:21:11 PM5/8/20
to AtoM Users
I have to correct myself ...

After duplicating the column "information_object_id" as "object_id" the upgrade process executed successfully... and I wasn't able to locate the digital objects and archival descriptions... but I remembered to run (as indicated by the migration docs) the commands:

php symfony digitalobject:regen-derivatives
php symfony search:populate
php symfony cc

The first one gave me some errors due to the Imagemagick configuration, but was solved.
after the other two completed... It seems that I have my IcaAtom fully migrated.

I have to wait for confirmation from the people that actually use the system, but it seems all went well.

Dan Gillean

unread,
May 12, 2020, 11:47:46 AM5/12/20
to ICA-AtoM Users
Hi Martin, 

Thanks for the update, and sorry for the delay in replying. I'm trying to get some developer time to look at this thread, since you ended up needing to follow an unconventional path to perform the upgrade and I'd like to determine why it was needed, and also make sure that our team doesn't foresee any unintended side effects of the solution you found. 

In the meantime, how has testing gone? Is your installation working as expected?

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.

Martin Longo

unread,
Jun 8, 2020, 2:02:49 PM6/8/20
to AtoM Users
Thanks Dan for the following up.  Testing has been going well, as everything that was working before is working in the new version.

I'm facing a new problem, but I will post it as a new thread.

Thanks again!

El miércoles, 6 de mayo de 2020, 18:22:07 (UTC-3), Martin Longo escribió:
Reply all
Reply to author
Forward
0 new messages