Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throws error on duplicate migrations in Sequel v. 3.24 #2

Open
danascheider opened this issue Sep 6, 2014 · 1 comment
Open

Throws error on duplicate migrations in Sequel v. 3.24 #2

danascheider opened this issue Sep 6, 2014 · 1 comment
Labels

Comments

@danascheider
Copy link
Owner

In Sequel version 3.24, the example titled does not run database migrations more than once fails:

Failure/Error: app.migration('this should run once') { fail }
     Sequel::DatabaseError:
       SQLite3::SQLException: index migrations_name_index already exists
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sqlite3-1.3.9/lib/sqlite3/database.rb:91:in `initialize'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sqlite3-1.3.9/lib/sqlite3/database.rb:91:in `new'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sqlite3-1.3.9/lib/sqlite3/database.rb:91:in `prepare'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sqlite3-1.3.9/lib/sqlite3/database.rb:223:in `execute_batch'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/adapters/sqlite.rb:130:in `block (2 levels) in _execute'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/logging.rb:28:in `log_yield'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/adapters/sqlite.rb:130:in `block in _execute'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/connection_pool/threaded.rb:71:in `hold'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/connecting.rb:226:in `synchronize'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/adapters/sqlite.rb:117:in `_execute'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/adapters/sqlite.rb:87:in `execute_dui'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/query.rb:64:in `execute_ddl'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/adapters/sqlite.rb:97:in `block in execute_ddl'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/connecting.rb:226:in `synchronize'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/adapters/sqlite.rb:94:in `execute_ddl'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/schema_methods.rb:369:in `block (2 levels) in create_table_indexes_from_generator'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/schema_methods.rb:369:in `each'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/schema_methods.rb:369:in `block in create_table_indexes_from_generator'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/schema_methods.rb:367:in `each'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/schema_methods.rb:367:in `create_table_indexes_from_generator'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/schema_methods.rb:98:in `create_table'
     # /home/dscheider/.rvm/gems/ruby-2.1.2/gems/sequel-3.24.0/lib/sequel/database/schema_methods.rb:115:in `create_table?'
     # ./lib/sinatra/sequel.rb:114:in `create_migrations_table'
     # ./lib/sinatra/sequel.rb:68:in `migration'
     # ./spec/sequel_sinatra_spec.rb:56:in `block (2 levels) in '
@danascheider
Copy link
Owner Author

Fixed in Sequel v. 3.25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant