On Jul 15, 5:59 am, Mewp <[email protected]> wrote:
> In my application, I have several directories with migrations -- one
> for the core of the application, and one for each plugin.
>
> I'm applying these with the following code:
>
> Dir['**/migrations'].each do |directory|
> next if Dir[directory + '/*'].empty?
> Sequel::IntegerMigrator.new(DB, directory).run
> end
>
> However, as all of the migrations are done on the same database,
> schema_info contains the number of the last migration done, without
> information about the directory where it ran.
>
> What would be the best way to avoid this problem? Is this a bug, or
> rather a design decision?
What you want to do is supported only if you use a separate table (via
the :table option). Maybe:
Sequel::IntegerMigrator.new(DB,
directory, :table=>:"schema_info_#{File.basename(directory)}").run
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.