Hi, jeremy, I sure this problem of error is solved, but as my topic, actually, i want export the schema from many tables that is created by many migrations, not from all of tables in database. In others words, it just integrates many migrations to a migration.
For example, this is 10 migrations. 001_migration.rb 002_migration.rb 003_migration.rb 004_migration.rb 005_migration.rb .. ... 010_migration.rb Generally, we will run the migrations to the database at first. Now, for certain reason, i need a schema that is created by many migration files, such as the file 004_migration.rb and 005_migration.rb So, how to export the schema that is created by migrations 004 and 005 ? On Dec 9, 8:33 am, Jeremy Evans <[email protected]> wrote: > On Dec 9, 1:00 am, coolesting <[email protected]> wrote: > > > DB = Sequel.connect('sqlite://db/data.db') > > require "sequel/extensions/schema_dumper" > > sd = Sequel::Database.new > > puts sd.dump_table_schema(:books) > > There's your problem. You should pretty much never do this: > > sd = Sequel::Database.new > > unless you are writing code to test Sequel itself. Sequel::Database is > an abstract class. > > You probably just want to do: > > require "sequel/extensions/schema_dumper" > Sequel.connect('sqlite://db/data.db').dump_schema_migration > > 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.
