Hi Jeremy,

I had to move forward with my work on our staging server and can no longer
replicate the environment in which I encountered this issue. The state of
the database on our production server doesn't appear to have the same
problem. If I ever encounter a similar issue, I will collect the additional
information you recommended.

Hopefully this thread be useful to someone in the future: If migrating to
latest (or to a specific target) quietly fails, specify `current` version
as well as `target` version in call to Sequel::Migrator.run().

Thanks!


Barbara Carradini
(919) 599-5947
www.bcarradini.com

On Thu, Jan 18, 2018 at 3:58 PM, Jeremy Evans <[email protected]>
wrote:

> 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 a topic in the
> Google Groups "sequel-talk" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/sequel-talk/c-uY8RGFDFQ/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

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