On Thursday, January 18, 2018 at 11:41:07 AM UTC-8, Barbara Carradini wrote: > > 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 > > (1) When I execute Sequel::Migrator.run(DB, migration_path) on a new, > empty database everything works fine. > > (2) When I execute Sequel::Migrator.run(DB, migration_path) on an > existing, populated database at version 38, I don't receive any errors > back, but the new columns *aren't added* to gift_subscriptions. > > (3) When I execute Sequel::Migrator.run(DB, migration_path, target: 39, > current: 38) on the same populated database, the migration works correctly > and the new columns are added to gift_subscriptions. >
Considering (2) and (3), one possible cause is database thinks it is already at migration 39? Can you run with the migration with an SQL logger, and also post the contents of the schema_info table? Thanks, Jeremy -- 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.
