On Feb 28, 1:56 am, vtypal <[email protected]> wrote:
> I' m using the following code to migrate a sqlite3 database on mysql
> using Sequel v.2.10.0:
>
> #!/usr/bin/ruby
> require 'rubygems'
> require 'sequel'
>
> DB1 = Sequel.connect('sqlite://my.db') # source db
> DB2 = Sequel.mysql('mysqldb', :user => 'cuser', :password =>
> 'cpasswd', :host => 'localhost')
>
> unless DB2[:mytable].table_exists?
>      DB2.create_table :aggelies do

Hopefully that is a copy/paste error, as you are checking if one table
exists, and then creating another if it does not.

>           column :username,  :text
>           column :hmer, :text
>           column :kath, :text
>           column :eiko, :text
>           column :titl, :text
>           column :peri, :text
>      end
> end

Clive is correct, Sequel doesn't appear to support prefix indexes, at
least without .lit.  I don't see any index statements in your code, so
it's odd that Sequel would be attempting to create an index.

If you want to create an index on the username field, try:

  index 'username(256)'.lit, :name=>:mytable_username_index

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

Reply via email to