padrino/padrino-framework · error

No MIGRATION_VERSION was provided

Error message

No MIGRATION_VERSION was provided

What it means

Error "No MIGRATION_VERSION was provided" thrown in padrino/padrino-framework.

Source

Thrown at padrino-gen/lib/padrino-gen/padrino-tasks/sequel.rb:16

if PadrinoTasks.load?(:sequel, defined?(Sequel))
  namespace :sq do
    namespace :migrate do
      desc 'Perform automigration (reset your db data)'
      task auto: :skeleton do
        ::Sequel.extension :migration
        ::Sequel::Migrator.run Sequel::Model.db, 'db/migrate', target: 0
        ::Sequel::Migrator.run Sequel::Model.db, 'db/migrate'
        puts '<= sq:migrate:auto executed'
      end

      desc 'Perform migration up/down to MIGRATION_VERSION'
      task :to, [:version] => :skeleton do |_t, args|
        version = (args[:version] || env_migration_version).to_s.strip
        ::Sequel.extension :migration
        raise 'No MIGRATION_VERSION was provided' if version.empty?
        ::Sequel::Migrator.apply(Sequel::Model.db, 'db/migrate', version.to_i)
        puts "<= sq:migrate:to[#{version}] executed"
      end

      desc 'Perform migration up to latest migration available'
      task up: :skeleton do
        ::Sequel.extension :migration
        ::Sequel::Migrator.run Sequel::Model.db, 'db/migrate'
        puts '<= sq:migrate:up executed'
      end

      desc 'Perform migration down (erase all data)'
      task down: :skeleton do
        ::Sequel.extension :migration
        ::Sequel::Migrator.run Sequel::Model.db, 'db/migrate', target: 0
        puts '<= sq:migrate:down executed'
      end
    end

View on GitHub (pinned to 167044f3d5)

When it happens

Trigger: Thrown at padrino-gen/lib/padrino-gen/padrino-tasks/sequel.rb:16 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of padrino/padrino-framework@167044f3d5 (2026-08-23). Data as JSON: /api/errors/1f6f73f7741ed6cb. Report an issue: GitHub.