I've added a new migration file (039_subscription_categories.rb) to my 
project.
    Sequel.migration do
      change do
        alter_table :gift_subscriptions do
          add_column :category_one, String
          add_column :category_two, String
        end
      end
    end

When I execute Sequel::Migrator.run(DB, migration_path) on a newly created, 
empty database, everything works great. The table gift_subscriptions has 
two new columns: category_one and category_two.

However, if I attempt to execute Sequel::Migrator.run(DB, migration_path) 
on a version 038 database that is populated... nothing happens. No errors 
are raised, but the new columns aren't added to the table.

Version Info:
  Sequel 5.4.0
  Sequel_PG 1.8.1
  PG 1.0.0

Migration Task:
  task :migrate, [:version] do |t, args|
    Sequel.extension :migration
    migration_path = "db/migrate"
    if args[:version]
      puts "Migrating to version #{args[:version]}"
      Sequel::Migrator.run(DB, migration_path, target: args[:version].to_i)
    else
      puts "Migrating to latest"
      Sequel::Migrator.run(DB, migration_path)
    end
  end

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to