Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. [solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled"

[solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled"

Added by Bernd Müller over 9 years ago

Hi!

Me again having issues updating OP :-/
I tried to follow this how-to.

When I execute the command RAILS_ENV="production" bundle exec rake db:migrate
I get

Migrating attachment 99/117 (150511111744_deleteconfig.PNG)
Migrating attachment 100/117 (150615164549_NO_CONNECTION_sERVER.PNG)
Migrating attachment 101/117 ()
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Invalid argument @ sys_fail2 - (/home/openproject/openproject/files, /home/openproject/openproject/files/files)/home/openproject/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:100:in `migrate_attachment'

Can someone please tell me what problem I am encoutering? And how to solve this.

Any assistance is appreciated!

Cheers

PS: As this manual update is always a pain in the a****, I wonder what steps need to be taken to switch to the packaged version of OP?


Replies (10)

RE: Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Bernd Müller over 9 years ago

Maybe this is related to the problem I had here

RE: Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Bernd Müller over 9 years ago

I have taken a look at the database and I found this here


My guess is that the missing disk_filename in the db could be the cause of that issue

RE: RE: Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Bernd Müller over 9 years ago

Hmmm….I kind of solved it. But this is really a crippled and ugly hack
.
What I did was following: I added foobar.png into to the missing “disk_filename” and then I could run the “migrate” command. But after that I wasn´t able to add attachments into OP workpackages. So I allowed “NULL” to the “disk_filename” structure and now I can add attachments. Still the added attachments have no entries in “disk_filename”. Meaning that there is still something wrong in OP…

How can I convince OP to create correct “disk_filename”? My guess is that OP is somehow not capable of creating a proper timestamp for the files…What can be done?

RE: [solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Jonas Heinrich (Finn) over 9 years ago

Hi Bernd,

this really looks like it’s connected to the other error you got/the other forum post.

It seems like your installation is somewhat broken. The easiest would be to set it all up again, maybe with a packaged based installation. Switching now to the packaged based installation unfortunately is not an option since the database would still be broken. If you could migrate everything to a new installation that would be the easiest.

If not, we have to fix the migrations. Seems like it was no good idea to skip the migration. We should run the migrations again and fix the errors that occur during that migrations. If you want to try this, please run DELETE FROM schema_migrations WHERE version='20140430125956' and run the migrations again. Then we will have to fix the errors that come up when you do so.

Sorry that I do not have a better answer for you.

Best,

Jonas

RE: [solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Bernd Müller over 9 years ago

Hi Jonas!

Thanks for your reply, I am currently working some other things. But I will get to this issue this week.

Cheers

RE: [solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Bernd Müller over 9 years ago

Ok, so let´s get this working…
First question before I do anything DELETE FROM schema_migrations WHERE version='20140430125956', what will happen when I enter this? Will my Openproject installation stop working? Meaning should I backup my DB…or is this a save command?

RE: [solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Jonas Heinrich (Finn) over 9 years ago

Hi Bernd,

backing up is always good! :)

Rails saves what migrations it’s run in that table. If you delete the relevant migration-number from it the migration will be run again. So that should be all.

But anyway, a backup always is a good thing.

Best,

Jonas

RE: [solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Bernd Müller over 9 years ago

Hey!

So, I made the backup and I tried the migration again:

AILS_ENV="production" bundle exec rake db:migrate
require 'rails/all'... 1.420s
Bundler.require... 4.970s
Application.initialize!... [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
8.620s
==  ResetContentTypes: migrating ==============================================
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

undefined method `empty?' for #<File:0x00000009857a10>/home/openproject/openproject/lib/open_project/content_type_detector.rb:113:in `blank_name?'
/home/openproject/openproject/lib/open_project/content_type_detector.rb:93:in `detect'
/home/openproject/openproject/app/models/attachment.rb:166:in `content_type_for'
/home/openproject/openproject/db/migrate/20140430125956_reset_content_types.rb:32:in `block in up'

Hmmm…what now, looks a bit broken? :-/

RE: [solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Jonas Heinrich (Finn) over 9 years ago

Hi Bernd,

it is really hard for me to tell what the error might be because I don’t exactly know, what you did. Could try again to list what actions you have taken? What version did work, what migration did not work and what migration you skipped etc.

Thanks,

Jonas

RE: [solved/very ugly/ still open]Manual udpdate 4 -> 4.2 failed: "StandardError: An error has occurred, all later migrations canceled" - Added by Bernd Müller over 9 years ago

Hi!

What version did work, what migration did not work and what migration you skipped etc.

I am not sure I think that the migration from version 3.* to 4 made the system unstable, but I have no notes what version was the last one that worked.
Now, my idea to solve that problem would be to install the packaged version and to transfer the data step by step.
But as we already know the data is somehow corrupt…hmm…do you think that this could be doable?

  • (1 - 10/10)
Loading...