class Sequel::Database

def create_table?(name, options={}, &block)

# CREATE TABLE a (a integer) -- if it doesn't already exist
# SELECT * FROM a LIMIT a -- check existence
DB.create_table?(:a){Integer :a}

Creates the table unless the table already exists.
def create_table?(name, options={}, &block)
  if supports_create_table_if_not_exists?
    create_table(name, options.merge(:if_not_exists=>true), &block)
  elsif !table_exists?(name)
    create_table(name, options, &block)
  end
end