Duplicate Constraint Key

251 views
Skip to first unread message

alcaraz....@gmail.com

unread,
Mar 25, 2019, 9:57:54 AM3/25/19
to AtoM Users

Hi, me again.

First of all, I want to say thank you all for the help. I have a new issues, when I execute the command "php symfony tools:upgrade-sql" throw me the next message:

SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table '#sql-38b1_15'

I searched and I figured out that error could be for duplicate constraint keys. I checked out but no one FK is duplicate.

mysql> SELEcT constraint_name, table_name FROM information_schema.table_constraints WHERE constraint_schema = 'atom';
+-------------------------------+--------------------------+
| constraint_name               | table_name               |
+-------------------------------+--------------------------+
| PRIMARY                       | access_log               |
| access_log_FK_1               | access_log               |
| PRIMARY                       | accession                |
| accession_U_1                 | accession                |
| accession_FK_1                | accession                |
| accession_FK_2                | accession                |
| accession_FK_3                | accession                |
| accession_FK_4                | accession                |
| accession_FK_5                | accession                |
| PRIMARY                       | accession_i18n           |
| accession_i18n_FK_1           | accession_i18n           |
| PRIMARY                       | acl_group                |
| acl_group_FK_1                | acl_group                |
| PRIMARY                       | acl_group_i18n           |
| acl_group_i18n_FK_1           | acl_group_i18n           |
| PRIMARY                       | acl_permission           |
| acl_permission_FK_1           | acl_permission           |
| acl_permission_FK_2           | acl_permission           |
| acl_permission_FK_3           | acl_permission           |
| PRIMARY                       | acl_user_group           |
| acl_user_group_FK_1           | acl_user_group           |
| acl_user_group_FK_2           | acl_user_group           |
| PRIMARY                       | actor                    |
| actor_FK_1                    | actor                    |
| actor_FK_2                    | actor                    |
| actor_FK_3                    | actor                    |
| actor_FK_4                    | actor                    |
| actor_FK_5                    | actor                    |
| PRIMARY                       | actor_i18n               |
| actor_i18n_FK_1               | actor_i18n               |
| PRIMARY                       | aip                      |
| aip_FK_1                      | aip                      |
| aip_FK_2                      | aip                      |
| aip_FK_3                      | aip                      |
| PRIMARY                       | contact_information      |
| contact_information_FK_1      | contact_information      |
| PRIMARY                       | contact_information_i18n |
| contact_information_i18n_FK_1 | contact_information_i18n |
| PRIMARY                       | deaccession              |
| deaccession_FK_1              | deaccession              |
| deaccession_FK_2              | deaccession              |
| deaccession_FK_3              | deaccession              |
| PRIMARY                       | deaccession_i18n         |
| deaccession_i18n_FK_1         | deaccession_i18n         |
| PRIMARY                       | digital_object           |
| digital_object_FK_1           | digital_object           |
| digital_object_FK_2           | digital_object           |
| digital_object_FK_3           | digital_object           |
| digital_object_FK_4           | digital_object           |
| digital_object_FK_5           | digital_object           |
| PRIMARY                       | donor                    |
| donor_FK_1                    | donor                    |
| PRIMARY                       | event                    |
| event_FK_1                    | event                    |
| event_FK_2                    | event                    |
| event_FK_3                    | event                    |
| event_FK_4                    | event                    |
| PRIMARY                       | event_i18n               |
| event_i18n_FK_1               | event_i18n               |
| PRIMARY                       | function                 |
| function_FK_1                 | function                 |
| function_FK_2                 | function                 |
| function_FK_3                 | function                 |
| function_FK_4                 | function                 |
| function_FK_5                 | function                 |
| PRIMARY                       | function_i18n            |
| function_i18n_FK_1            | function_i18n            |
| PRIMARY                       | granted_right            |
| granted_right_FK_1            | granted_right            |
| granted_right_FK_2            | granted_right            |
| PRIMARY                       | information_object       |
| information_object_U_1        | information_object       |
| information_object_FK_1       | information_object       |
| information_object_FK_2       | information_object       |
| information_object_FK_3       | information_object       |
| information_object_FK_4       | information_object       |
| information_object_FK_5       | information_object       |
| information_object_FK_6       | information_object       |
| information_object_FK_7       | information_object       |
| information_object_ibfk_1     | information_object       |
| PRIMARY                       | information_object_i18n  |
| information_object_i18n_FK_1  | information_object_i18n  |
| PRIMARY                       | job                      |
| job_FK_1                      | job                      |
| job_FK_2                      | job                      |
| job_FK_3                      | job                      |
| job_FK_4                      | job                      |
| PRIMARY                       | keymap                   |
| PRIMARY                       | menu                     |
| menu_FK_1                     | menu                     |
| PRIMARY                       | menu_i18n                |
| menu_i18n_FK_1                | menu_i18n                |
| PRIMARY                       | note                     |
| note_FK_1                     | note                     |
| note_FK_2                     | note                     |
| note_FK_3                     | note                     |
| PRIMARY                       | note_i18n                |
| note_i18n_FK_1                | note_i18n                |
| PRIMARY                       | oai_harvest              |
| oai_harvest_FK_1              | oai_harvest              |
| PRIMARY                       | oai_repository           |
| PRIMARY                       | object                   |
| PRIMARY                       | object_term_relation     |
| object_term_relation_FK_1     | object_term_relation     |
| object_term_relation_FK_2     | object_term_relation     |
| object_term_relation_FK_3     | object_term_relation     |
| PRIMARY                       | other_name               |
| other_name_FK_1               | other_name               |
| other_name_FK_2               | other_name               |
| PRIMARY                       | other_name_i18n          |
| other_name_i18n_FK_1          | other_name_i18n          |
| PRIMARY                       | physical_object          |
| physical_object_FK_1          | physical_object          |
| physical_object_FK_2          | physical_object          |
| physical_object_FK_3          | physical_object          |
| PRIMARY                       | physical_object_i18n     |
| physical_object_i18n_FK_1     | physical_object_i18n     |
| PRIMARY                       | premis_object            |
| premis_object_FK_1            | premis_object            |
| premis_object_FK_2            | premis_object            |
| PRIMARY                       | property                 |
| property_FK_1                 | property                 |
| PRIMARY                       | property_i18n            |
| property_i18n_FK_1            | property_i18n            |
| PRIMARY                       | relation                 |
| relation_FK_1                 | relation                 |
| relation_FK_2                 | relation                 |
| relation_FK_3                 | relation                 |
| relation_FK_4                 | relation                 |
| PRIMARY                       | relation_i18n            |
| relation_i18n_FK_1            | relation_i18n            |
| PRIMARY                       | repository               |
| repository_FK_1               | repository               |
| repository_FK_2               | repository               |
| repository_FK_3               | repository               |
| PRIMARY                       | repository_i18n          |
| repository_i18n_FK_1          | repository_i18n          |
| PRIMARY                       | rights                   |
| rights_FK_1                   | rights                   |
| rights_FK_2                   | rights                   |
| rights_FK_3                   | rights                   |
| rights_FK_4                   | rights                   |
| rights_FK_5                   | rights                   |
| PRIMARY                       | rights_holder            |
| rights_holder_FK_1            | rights_holder            |
| PRIMARY                       | rights_i18n              |
| rights_i18n_FK_1              | rights_i18n              |
| PRIMARY                       | setting                  |
| PRIMARY                       | setting_i18n             |
| setting_i18n_FK_1             | setting_i18n             |
| PRIMARY                       | slug                     |
| slug_U_1                      | slug                     |
| slug_U_2                      | slug                     |
| slug_FK_1                     | slug                     |
| PRIMARY                       | static_page              |
| static_page_FK_1              | static_page              |
| PRIMARY                       | static_page_i18n         |
| static_page_i18n_FK_1         | static_page_i18n         |
| PRIMARY                       | status                   |
| status_FK_1                   | status                   |
| status_FK_2                   | status                   |
| status_FK_3                   | status                   |
| PRIMARY                       | taxonomy                 |
| taxonomy_FK_1                 | taxonomy                 |
| taxonomy_FK_2                 | taxonomy                 |
| PRIMARY                       | taxonomy_i18n            |
| taxonomy_i18n_FK_1            | taxonomy_i18n            |
| PRIMARY                       | term                     |
| term_FK_1                     | term                     |
| term_FK_2                     | term                     |
| term_FK_3                     | term                     |
| PRIMARY                       | term_i18n                |
| term_i18n_FK_1                | term_i18n                |
| PRIMARY                       | user                     |
| user_FK_1                     | user                     |
+-------------------------------+--------------------------+
175 rows in set (0,02 sec)

I tried drop DB and create a new with a backup, but It didn't work.

PHP 5.6
MySQL 5.6

I hope you can help me.

mi...@artefactual.com

unread,
Mar 25, 2019, 10:53:48 PM3/25/19
to AtoM Users
Hi,

What version of AtoM are you using?

Cheers,
Mike Cantelon
Artefactual Systems

alcaraz....@gmail.com

unread,
Mar 26, 2019, 9:15:42 AM3/26/19
to AtoM Users
I'm using 2.1 and want to upgrade to 2.4.1.

alcaraz....@gmail.com

unread,
Mar 26, 2019, 10:50:13 AM3/26/19
to AtoM Users
The state of my tables, maybe this can help a little.

 Name                       Engine   Version   Row_format   Rows      Avg_row_length   Data_length   Max_data_length   Index_length   Data_free   Auto_increment   Create_time                                                                   Update_time   Check_time   Collation           Checksum   Create_options   Comment 
 access_log                 InnoDB  10  Compact     2778585 43 121241600 0 129220608 32505856 2734129  2019-03-26                                                         11:06:43   NULL          NULL         utf8_unicode_ci         NULL                            
 accession                  InnoDB  10  Compact     0 0 16384 0 81920 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 accession_i18n             InnoDB  10  Compact     0 0 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 acl_group                  InnoDB  10  Compact     8 2048 16384 0 16384 32505856 105  2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 acl_group_i18n             InnoDB  10  Compact     8 2048 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 acl_permission             InnoDB  10  Compact     38 431 16384 0 49152 32505856 39  2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 acl_user_group             InnoDB  10  Compact     13 1260 16384 0 32768 32505856 14  2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 actor                      InnoDB  10  Compact     5821 47 278528 0 475136 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 actor_i18n                 InnoDB  10  Compact     1377 1154 1589248 0 0 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 aip                        InnoDB  10  Compact     0 0 16384 0 32768 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 contact_information        InnoDB  10  Compact     4 4096 16384 0 16384 32505856 6  2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 contact_information_i18n   InnoDB  10  Compact     5 3276 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 deaccession                InnoDB  10  Compact     0 0 16384 0 32768 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 deaccession_i18n           InnoDB  10  Compact     0 0 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 digital_object             InnoDB  10  Compact     582 422 245760 0 65536 32505856            NULL   2019-03-26                                                         11:34:39   NULL          NULL         utf8_unicode_ci         NULL                            
 donor                      InnoDB  10  Compact     0 0 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:01   NULL          NULL         utf8_unicode_ci         NULL                            
 event                      InnoDB  10  Compact     14357 110 1589248 0 917504 32505856            NULL   2019-03-26                                                         11:34:38   NULL          NULL         utf8_unicode_ci         NULL                            
 event_i18n                 InnoDB  10  Compact     15894 99 1589248 0 0 32505856            NULL   2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 function                   InnoDB  10  Compact     0 0 16384 0 65536 32505856            NULL   2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 function_i18n              InnoDB  10  Compact     0 0 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 granted_right              InnoDB  10  Compact     0 0 16384 0 32768 32505856 1  2019-03-26                                                         11:09:02   NULL          NULL         latin1_swedish_ci       NULL                            
 information_object         InnoDB  10  Compact     8124 195 1589248 0 1392640 32505856 14422  2019-03-26                                                         11:34:39   NULL          NULL         utf8_unicode_ci         NULL                            
 information_object_i18n    InnoDB  10  Compact     6865 689 4734976 0 0 32505856            NULL   2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 job                        InnoDB  10  Compact     0 0 16384 0 49152 32505856            NULL   2019-03-26                                                         11:37:10   NULL          NULL         latin1_swedish_ci       NULL                            
 keymap                     InnoDB  10  Compact     3193 76 245760 0 0 32505856 2952  2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 menu                       InnoDB  10  Compact     63 260 16384 0 16384 32505856 65  2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 menu_i18n                  InnoDB  10  Compact     348 47 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 note                       InnoDB  10  Compact     7066 60 425984 0 475136 32505856 9580  2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 note_i18n                  InnoDB  10  Compact     8769 48 425984 0 0 32505856            NULL   2019-03-26                                                         11:09:02   NULL          NULL         utf8_unicode_ci         NULL                            
 oai_harvest                InnoDB  10  Compact     0 0 16384 0 16384 32505856 1  2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 oai_repository             InnoDB  10  Compact     0 0 16384 0 0 32505856 1  2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 object                     InnoDB  10  Compact     73840 64 4734976 0 0 32505856 86698  2019-03-26                                                         11:34:40   NULL          NULL         utf8_unicode_ci         NULL                            
 object_term_relation       InnoDB  10  Compact     7586 43 327680 0 458752 32505856            NULL   2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 other_name                 InnoDB  10  Compact     100 163 16384 0 32768 32505856 106  2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 other_name_i18n            InnoDB  10  Compact     101 162 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 physical_object            InnoDB  10  Compact     8691 43 376832 0 278528 32505856            NULL   2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 physical_object_i18n       InnoDB  10  Compact     8539 47 409600 0 0 32505856            NULL   2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 premis_object              InnoDB  10  Compact     0 0 16384 0 16384 32505856            NULL   2019-03-26                                                         11:09:03   NULL          NULL         latin1_swedish_ci       NULL                            
 property                   InnoDB  10  Compact     20371 78 1589248 0 475136 32505856 25436  2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 property_i18n              InnoDB  10  Compact     19099 193 3686400 0 0 32505856            NULL   2019-03-26                                                         11:09:03   NULL          NULL         utf8_unicode_ci         NULL                            
 relation                   InnoDB  10  Compact     8674 47 409600 0 688128 32505856            NULL   2019-03-26                                                         11:09:04   NULL          NULL         utf8_unicode_ci         NULL                            
 relation_i18n              InnoDB  10  Compact     10333 30 311296 0 0 32505856            NULL   2019-03-26                                                         11:09:04   NULL          NULL         utf8_unicode_ci         NULL                            
 repository                 InnoDB  10  Compact     44 372 16384 0 32768 32505856            NULL   2019-03-26                                                         11:09:04   NULL          NULL         utf8_unicode_ci         NULL                            
 repository_i18n            InnoDB  10  Compact     23 1424 32768 0 0 32505856            NULL   2019-03-26                                                         11:09:04   NULL          NULL         utf8_unicode_ci         NULL                            
 rights                     InnoDB  10  Compact     0 0 16384 0 65536 32505856            NULL   2019-03-26                                                         11:34:39   NULL          NULL         utf8_unicode_ci         NULL                            
 rights_holder              InnoDB  10  Compact     0 0 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:04   NULL          NULL         utf8_unicode_ci         NULL                            
 rights_i18n                InnoDB  10  Compact     0 0 16384 0 0 32505856            NULL   2019-03-26                                                         11:34:39   NULL          NULL         utf8_unicode_ci         NULL                            
 setting                    InnoDB  10  Compact     143 114 16384 0 0 32505856 150  2019-03-26                                                         11:09:04   NULL          NULL         utf8_unicode_ci         NULL                            
 setting_i18n               InnoDB  10  Compact     282 58 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:04   NULL          NULL         utf8_unicode_ci         NULL                            
 slug                       InnoDB  10  Compact     60217 61 3686400 0 4227072 32505856 91797  2019-03-26                                                         11:09:04   NULL          NULL         utf8_unicode_ci         NULL                            
 static_page                InnoDB  10  Compact     2 8192 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:05   NULL          NULL         utf8_unicode_ci         NULL                            
 static_page_i18n           InnoDB  10  Compact     23 2137 49152 0 0 32505856            NULL   2019-03-26                                                         11:09:05   NULL          NULL         utf8_unicode_ci         NULL                            
 status                     InnoDB  10  Compact     8301 47 393216 0 475136 32505856 14417  2019-03-26                                                         11:09:05   NULL          NULL         utf8_unicode_ci         NULL                            
 taxonomy                   InnoDB  10  Compact     45 364 16384 0 16384 32505856            NULL   2019-03-26                                                         11:09:05   NULL          NULL         utf8_unicode_ci         NULL                            
 taxonomy_i18n              InnoDB  10  Compact     335 146 49152 0 0 32505856            NULL   2019-03-26                                                         11:09:05   NULL          NULL         utf8_unicode_ci         NULL                            
 term                       InnoDB  10  Compact     3289 54 180224 0 262144 32505856            NULL   2019-03-26                                                         11:34:39   NULL          NULL         utf8_unicode_ci         NULL                            
 term_i18n                  InnoDB  10  Compact     3952 62 245760 0 0 32505856            NULL   2019-03-26                                                         11:09:05   NULL          NULL         utf8_unicode_ci         NULL                            
 user                       InnoDB  10  Compact     11 1489 16384 0 0 32505856            NULL   2019-03-26                                                         11:09:05   NULL          NULL         utf8_unicode_ci         NULL                            

mi...@artefactual.com

unread,
Mar 26, 2019, 2:52:37 PM3/26/19
to AtoM Users
Thanks! I'm going to try to test out that upgrade path and see if I can replicate the issue you're running into... I'll give you an update afterwords.

Mike Cantelon,
Artefactual Systems

On Monday, March 25, 2019 at 6:57:54 AM UTC-7, alcaraz....@gmail.com wrote:

alcaraz....@gmail.com

unread,
Mar 28, 2019, 3:04:21 PM3/28/19
to AtoM Users
I was searching for duplicate entries in PK's columns and I found that i have many duplicate values.

Tables with duplicate values
acl_group_i18n
actor_i18n
contact_information_i18n
event_i18n
information_object_i18n
menu_i18n
note_i18n
other_name_i18n
physical_object_i18n
property_i18n
relation_i18n
repository_i18n
setting_i18n
static_page_page_i18n
taxonomy_i18n
term_i18n

I was thinking alter the columns removing PK, upgrade and then put it back. Someone tried that?

mi...@artefactual.com

unread,
Apr 1, 2019, 7:54:32 PM4/1/19
to AtoM Users
Hi,

I wasn't able to replace the issue it sounds, like you're facing, but seems like you've found some issues in your data that could be the root of the problem. If you can fix the PK duplication that could help.

Feel free to email me at mi...@artefactual.com and I can take a look at your data as well.

Cheers,
Mike Cantelon
Artefactual Systems

alcaraz....@gmail.com

unread,
Apr 5, 2019, 2:22:06 PM4/5/19
to AtoM Users
Hi,

I droped FK and then droped PK on tables with duplicate values, but the problem persist. So I keeped the DB without modification, copied the uploads folder, opened the browser with localhost to run the web installer (throw me error message), after that, some information appear on the web but not all. Finally I executed the following command:

php symfony cc && php symfony search:populate
php symfony digitalobject:regen-derivatives
php symfony digitalobject:extract-text
php symfony propel:build-nested-set

The site look pretty well after that, but I'm testing it.

What exactly does the command php symfony tools:upgrade-sql?

Thanks.


Dan Gillean

unread,
Apr 8, 2019, 11:51:24 AM4/8/19
to ICA-AtoM Users
Hi there, 

The upgrade-sql task runs database schema migrations to make sure that, when we add new features or change AtoM in a way that affects the database, your database is updated to included the changes. You can see the schema migration scripts that are run sequentially by this task here, and in the subdirectories: 
When you look in Admin > Settings > Global at the application version, you will see it usually includes 2 numbers, like this: 
  • 2.4.0 - 156
The first number is the release version. The second number if the database schema version. If you forget to run the upgrade-sql task when upgrading it can cause issues because some of the tables or columns that AtoM expects will either not be there, or be in an unexpected form. 

I'm glad to hear that so far, this has helped you! Let us know how the rest of your testing goes. 

Cheers, 

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


--
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 post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/f62d7d9f-aa14-40a8-bbfc-fff60e992762%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

alcaraz....@gmail.com

unread,
Jun 14, 2019, 12:26:39 PM6/14/19
to AtoM Users
Hello everyone,

A few week ago I returned to try upgrade the atom's version, I did it, but only to 2.4.1 version. The problems started with the previuos administrator that tried to upgrade to 2.4.0 version and just changed the database, I guess the installation proccess throwed him an error. So the database's version was 2.4.1 but the program keeped in 2.1.0. I droped 2 tables from the database (job and premis_object) and it worked!!!
Now i'm trying to upgrade to 2.5.0 but throw me the next error when execute the command "php symfony search:populate"

"name cannot be empty string"

I checked the queries logs:

9-06-14T15:29:11.837058Z       16 Query      SET NAMES 'utf8'
2019-06-14T15:29:11.848928Z       16 Query      SELECT object.CLASS_NAME, object.CREATED_AT, object.UPDATED_AT, object.ID, object.SERIAL_NUMBER FROM `object`, `slug` WHERE slug.SLUG='home' AND slug.OBJECT_ID=object.ID
2019-06-14T15:29:11.854431Z       16 Query      SELECT
        setting.*,
        (CASE WHEN (current.VALUE IS NOT NULL AND current.VALUE <> "") THEN current.VALUE ELSE source.VALUE END) AS value,
        (CASE WHEN (current.CULTURE IS NOT NULL AND current.CULTURE <> "") THEN current.CULTURE ELSE source.CULTURE END) AS culture,
        source.VALUE AS value_source
      FROM setting
      LEFT JOIN setting_i18n current
        ON (setting.ID = current.id AND current.CULTURE = 'es')
      LEFT JOIN setting_i18n source
        ON (setting.ID = source.id AND source.CULTURE = setting.SOURCE_CULTURE)
2019-06-14T15:29:12.426456Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.426935Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.427410Z       16 Query      SELECT setting_i18n.VALUE, setting_i18n.ID, setting_i18n.CULTURE FROM `setting_i18n` WHERE setting_i18n.ID=27
2019-06-14T15:29:12.427853Z       16 Query      SELECT setting_i18n.VALUE, setting_i18n.ID, setting_i18n.CULTURE FROM `setting_i18n` WHERE setting_i18n.ID=31
2019-06-14T15:29:12.428239Z       16 Query      SELECT setting_i18n.VALUE, setting_i18n.ID, setting_i18n.CULTURE FROM `setting_i18n` WHERE setting_i18n.ID=48
2019-06-14T15:29:12.428581Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.428929Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.429520Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.429823Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.430373Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.430689Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.431298Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.431731Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.432307Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.432663Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.433245Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.433912Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.434527Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.434923Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.435527Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.436037Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.436679Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.437028Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.437615Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.437966Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.438559Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.439046Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.439666Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.439957Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.440540Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.440830Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.441418Z       16 Query      SELECT COUNT(*) FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.441708Z       16 Query      SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages'
2019-06-14T15:29:12.458370Z       16 Quit


The last query returned the next result:

SELECT setting.NAME, setting.SCOPE, setting.EDITABLE, setting.DELETEABLE, setting.SOURCE_CULTURE, setting.ID, setting.SERIAL_NUMBER FROM `setting` WHERE setting.SCOPE='i18n_languages';
+------+----------------+----------+------------+----------------+----+---------------+
| NAME | SCOPE          | EDITABLE | DELETEABLE | SOURCE_CULTURE | ID | SERIAL_NUMBER |
+------+----------------+----------+------------+----------------+----+---------------+
| es   | i18n_languages |        1 |          0 | es             | 27 |             0 |
| pt   | i18n_languages |        1 |          1 | en             | 31 |             0 |
| en   | i18n_languages |        1 |          1 | en             | 48 |             0 |
+------+----------------+----------+------------+----------------+----+---------------+
3 rows in set (0,00 sec)



Any suggestion?


El lunes, 8 de abril de 2019, 12:51:24 (UTC-3), Dan Gillean escribió:
Hi there, 

The upgrade-sql task runs database schema migrations to make sure that, when we add new features or change AtoM in a way that affects the database, your database is updated to included the changes. You can see the schema migration scripts that are run sequentially by this task here, and in the subdirectories: 
When you look in Admin > Settings > Global at the application version, you will see it usually includes 2 numbers, like this: 
  • 2.4.0 - 156
The first number is the release version. The second number if the database schema version. If you forget to run the upgrade-sql task when upgrading it can cause issues because some of the tables or columns that AtoM expects will either not be there, or be in an unexpected form. 

I'm glad to hear that so far, this has helped you! Let us know how the rest of your testing goes. 

Cheers, 

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


To unsubscribe from this group and stop receiving emails from it, send an email to ica-ato...@googlegroups.com.

Corinne Rogers

unread,
Jun 14, 2019, 7:37:25 PM6/14/19
to AtoM Users
Hi Emmanuel,

For the immediate error, please make sure you are using Elasticsearch 5.6 (and the correct version of Java) in 2.5 as per the installation documents or upgrade documents

i would also suggest that you:

- drop and recreate the database
- load your data
- run the upgrade task (as per the upgrade documents)
- restarted all services (see the upgrade documents)

Finally, I recommend that you review the section on troubleshooting re: data corruption, and try the queries listed there.

Let us know what you find, and if you still have questions!

best regards,
Corinne

Corinne Rogers, PhD
Systems Archivist
Artefactual Systems
Reply all
Reply to author
Forward
0 new messages