class Sequel::SQLite::Database

def execute_ddl(sql, opts={})

table while a prepared statement that references it still exists.
prepared statements lock the table in such a way that you can't drop or alter the
Drop any prepared statements on the connection when executing DDL. This is because
def execute_ddl(sql, opts={})
  synchronize(opts[:server]) do |conn|
    conn.prepared_statements.values.each{|cps, s| cps.close}
    conn.prepared_statements.clear
    super
  end
end