Hi,
I would like to run a migration inside a Sinatra get. I am getting:
NoMethodError at /migration
undefined method `migration' for #<Sequel::MySQL::Database: "mysql://
user:passwd@localhost/extradb">
The code:
require 'rubygems'
require 'sequel'
DB = Sequel.connect('mysql://user:passwd@localhost/extradb')
DB.migration do
def change
create_table(:artists) do
primary_key :id
String :name
end
end
end
I know that the code seems strange, but based on some meta-data info I
would like to select a DB and modify the schema: create a tablle, add
a column to a table. I do not want to run migrations the Sinatra why.
--
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.