[Archivesspace_Users_Group] Database schema mismatch

Joshua D. Shaw Joshua.D.Shaw at dartmouth.edu
Thu Jun 29 16:48:16 EDT 2023


If the schema thinks its at 153, it almost sounds like a migration failed during an attempted version update - probably migration 153 or 154 (can't remember if the schema gets updated before or after the migration runs).

You can check to see if you have a failed migration/version update by checking some of the earlier migrations. For example, you can check the db to see if the custom_report_template table has a limit column. That would indicate that migration 151 ran (for example).

You might also check to see if the data dump that you got originally has that invalid schema or if its a result of something you may have tried in your dev environment.

If you run a migration for a newer versions and migration 153 or 154 actually failed, then your db schema will not include the changes in that migration and you'll need to fix that manually.

153 added two columns to the accession table: language_id and script_id
154 added a column to the lang_material table: accession_id as a foriegn key.

jds
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Blake Carver <blake.carver at lyrasis.org>
Sent: Thursday, June 29, 2023 3:36 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Database schema mismatch

Hopefully? I'm not sure how it got in that state and it's hard to know what's been done.
You can certainly try 3.4 and see how it goes.
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Ludwig Possie <ludwigpossie at weber.edu>
Sent: Thursday, June 29, 2023 3:28 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Database schema mismatch

If I run AS v3.4.0 in my test environment and run the setup-database script will it update the db to the correct version?

L

On Thu, Jun 29, 2023 at 1:25 PM Blake Carver <blake.carver at lyrasis.org<mailto:blake.carver at lyrasis.org>> wrote:
"However, your schema info version is set at 153"

Not sure what happened there, but as far as I can tell, that's not a real version. V3.0.1 is supposed to be schema version 147. I don't see any release with schema number 147.
Maybe there was a failed upgrade in the past and that reset the number or someone manaully changed the number?

In any case, it's hard to know what's going on with that DB.
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Ludwig Possie <ludwigpossie at weber.edu<mailto:ludwigpossie at weber.edu>>
Sent: Thursday, June 29, 2023 2:33 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: Re: [Archivesspace_Users_Group] Database schema mismatch

I downloaded AS v 3.0.1 in my test environment in order to get AS working like in production prior to attempting the upgrade.  The error is in the test environment, production is fine.  I ran the setup-database script in test, no errors.  I then tried to run AS in test, but I'm getting the wrong schema error.  The error states that the schema for the DB is at is 153, but I don't see that schema number on the list you provided, so I'm supposing perhaps I downloaded the wrong version of AS, but I'm not sure what version I should be using.

ArchivesSpace has encountered a problem with your database schema info version.

The schema info version should be 147 for ArchivesSpace version v3.0.1.
 However, your schema info version is set at 153
Please ensure your migrations have been run and completed by using the setup-database script.

On Thu, Jun 29, 2023 at 12:21 PM Blake Carver <blake.carver at lyrasis.org<mailto:blake.carver at lyrasis.org>> wrote:

 "The schema info version should be 147 for ArchivesSpace version v3.0.1."

I think you're missing part of the error, so I'm not sure if you're ahead or behind on that.
That error is from the test env?
You have 3.4 on the test env? Did you run the setup-database script? That's usually the problem.
Every release has a schema version:
https://github.com/archivesspace/tech-docs/blob/master/development/releases.md
(that's a bit behind the times I see)

________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Ludwig Possie <ludwigpossie at weber.edu<mailto:ludwigpossie at weber.edu>>
Sent: Thursday, June 29, 2023 12:52 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: [Archivesspace_Users_Group] Database schema mismatch

I'm trying to upgrade our version of Archivesspace and I have created a test environment in a virtual machine.  When I import the database from production and I attempt to run AS, I get a database migration error, "The schema info version should be 147 for ArchivesSpace version v3.0.1."  I ran the database migration script "setup-database.sh" and it seems to have ran without issues, but I'm still getting the above-mentioned error when I attempt to run AS.  I was told that we are currently running AS v3.0.1.  I'm supposing that the DB schema differs from different versions of AS.  Am I missing a step or something?  I would appreciate any advice anyone can provide.  Thx.


--
Ludwig Possié
Systems Admin
Stewart Library
Weber State University
801-626-8093
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


--
Ludwig Possié
Systems Admin
Stewart Library
Weber State University
801-626-8093
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
--
Ludwig Possié
Systems Admin
Stewart Library
Weber State University
801-626-8093
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20230629/f0cc9235/attachment.html>


More information about the Archivesspace_Users_Group mailing list