Good Morning (As I've learned earlier today would be correct!)

On Wed, Jun 8, 2011 at 8:02 PM, Iain Barnett <[email protected]> wrote:

> Hi all,
>
> I want to run migrations against an in-memory sqlite3 database for testing
> with RSpec. If the contents of 001_project.rb is:
>
> Sequel.migration do
>  up do
>    create_table(:services, :ignore_index_errors=>true) do
>      primary_key :services_id
>      String :service, :size=>30, :null=>false
>
>      index [:service], :name=>:uq_services, :unique=>true
>    end
>  end
>
>  down do
>    drop_table :services
>  end
> end
>
>
DB = Sequel.connect(...)
Sequel::Migrator.apply(DB, migration_directory)

Docs here - http://sequel.rubyforge.org/rdoc/classes/Sequel/Migrator.html

John

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

Reply via email to