Open russellsilva opened 9 years ago
Hi @russellsilva,
thanks for raising your concerns about this, I need to check but I think there's a way to have verbose migrations from Sequel's Migrator by setting it's logger to stdout. The drawback it that it's really verbose as it outputs all the SQL being send to the db.
There's no easy hook
for us to filter this output once enabled, so I don't think it should be enabled by default.
I'll check what we can do about it when I have some time (hint: a PR for it would be awesome).
+1. rake db:migrate:down VERSION=
is failing silently and I'm having to run on the console manually to see something happenning: ::Sequel::Migrator.run(::Sequel::Model.db, SequelRails::Migrations.migrations_dir, target: 20170415131036)
, still not working :(
rake db:migrate:down
doesn't seem to work at all. The only way I could make something similar was to rollback all recent migrations to a previous migrations: Sequel::Migrator.apply(DB, SequelRails::Migrations.migrations_dir, 20170415130850)
padrino seems to have this wonderfully. I just executed few migration and i got INFO from Sequel. However, I am unable to achieve same task for SequelRails. I tried few workaround but it seems Sequel only sends SQL Queries. Nothing else. I cannot retrieve anything other than sql logs. Weird.
@JonathanTron, have you ever time to look at this? Sequel has a log_info method. This method feeds informational messages from few classes such as Migrations...
db:migrate:down
is actually ::Sequel::Migrator.run(::Sequel::Model.db, SequelRails::Migrations.migrations_dir, opts)
Which at most rollback migrations until target
(specified by VERSION
) is reached
https://github.com/jeremyevans/sequel/blob/5.74.0/lib/sequel/extensions/migration.rb#L761
If running specific migration is desired a new migrator must be written
Edit 1: e.g. bundle exec rake sq:migrate:down VERSION=20231101063614
means
20231101063614
20231101063614
ActiveRecord
rake db:migrate
and friends emit output that helps developers see what the command is doing and provides context if something goes wrong. Here's a canonical example from the Ruby on Rails guide.sequel-rails
migration rake tasks appear to emit no output when a command is successful and little to no contextual information when a failure occurs. I recently had failingrake db:migrate:down
invocations that were not even emitting which migration file they were failing on. Couldsequel-rails
rake tasks provide more output?