Question about upgrading Canvas (error when trying to migrate)

30 views
Skip to first unread message

Juan Paulo Pérez Tejada

unread,
Feb 22, 2024, 3:26:17 PMFeb 22
to Canvas LMS Users
Hi, there

I recently installed canvas and upgraded to test the process following the instructure documentation. When I tried to migrate, it appeared an error saying migration AddSingletonColumn migration appears multiple times, which is true but with different dates in the name. How do you handle that? 

Cody Cutrer

unread,
Feb 23, 2024, 10:57:19 AMFeb 23
to canvas-l...@googlegroups.com
Make sure when you upgrade you're doing a fresh checkout of Canvas. You cannot simply unpack all the new files over an existing installation, since some files have been deleted or renamed in the meantime.

Cody Cutrer
Software Engineer
Instructure

On Thu, Feb 22, 2024 at 1:26 PM Juan Paulo Pérez Tejada <ju...@daiuk.com.mx> wrote:
Hi, there

I recently installed canvas and upgraded to test the process following the instructure documentation. When I tried to migrate, it appeared an error saying migration AddSingletonColumn migration appears multiple times, which is true but with different dates in the name. How do you handle that? 

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/canvas-lms-users/c0a0f82d-9452-4e32-b236-d5e7e7cb5544n%40googlegroups.com.

Juan Paulo Pérez Tejada

unread,
Feb 23, 2024, 4:38:56 PMFeb 23
to Canvas LMS Users
The only changes that I have performed are config files and the upgrade is just one week after installing production. There's not pending migrations, but I'm aware that I won't be able to migrate in an upgrade with modifications to the database. I share below the error logs:

$ RAILS_ENV=production bundle exec rake db:migrate:predeploy

1: production:public

rake aborted!

ActiveRecord::DuplicateMigrationNameError: 


Multiple migrations have the name AddSingletonColumn.


/var/canvas/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1433:in `validate'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8/lib/active_record/migration.rb:1306:in `initialize'

/var/canvas/lib/tasks/canvas.rake:192:in `new'

/var/canvas/lib/tasks/canvas.rake:192:in `block (3 levels) in <top (required)>'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/tasks/switchman.rake:98:in `block (6 levels) in shardify_task'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/tasks/switchman.rake:98:in `each'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/tasks/switchman.rake:98:in `block (5 levels) in shardify_task'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/switchman/database_server.rb:189:in `unguard'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/tasks/switchman.rake:97:in `block (4 levels) in shardify_task'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/switchman/shard.rb:266:in `block (2 levels) in with_each_shard'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/switchman/shard.rb:105:in `activate'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/switchman/shard.rb:585:in `activate'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/switchman/shard.rb:260:in `block in with_each_shard'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8/lib/active_record/relation/delegation.rb:88:in `each'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8/lib/active_record/relation/delegation.rb:88:in `each'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/switchman/shard.rb:256:in `with_each_shard'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/tasks/switchman.rake:93:in `block (3 levels) in shardify_task'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/switchman/database_server.rb:189:in `unguard'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/tasks/switchman.rake:91:in `block (2 levels) in shardify_task'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/guardrail-3.0.3/lib/guard_rail.rb:11:in `block in activate'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8/lib/active_record/connection_handling.rb:374:in `with_role_and_shard'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8/lib/active_record/connection_handling.rb:156:in `connected_to'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/guardrail-3.0.3/lib/guard_rail.rb:11:in `activate'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/switchman/guard_rail.rb:13:in `activate'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-inst-jobs-4.0.16/lib/switchman_inst_jobs/guard_rail.rb:10:in `activate'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/switchman-3.5.18/lib/tasks/switchman.rake:90:in `block in shardify_task'

/var/canvas/vendor/bundle/ruby/3.1.0/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'

Tasks: TOP => db:migrate:predeploy

(See full trace by running task with --trace) 
Reply all
Reply to author
Forward
0 new messages