Skip to content

use table_exists? to detect if migration table should be created to avoid SQLite3 error #8

Open
wants to merge 1 commit into from
View
2 lib/sinatra/sequel.rb
@@ -38,7 +38,7 @@ def migration(name, &block)
protected
def create_migrations_table
- database.create_table? :migrations do
+ unless database.table_exists? :migrations
primary_key :id
String :name, :null => false, :index => true
timestamp :ran_at
Something went wrong with that request. Please try again.