Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • 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
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional 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?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Expanded. Click to collapseCollapsed. Click to showWiki
        • Hierarchy leaf2nd Level Support
You are here:
  • Forums
  • Support Installation & Updates

Content

[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 7 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 7 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 7 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 7 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 7 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 7 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 7 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 7 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 7 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 7 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 7 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...