Module: SQL::Sqlite

Defined in:
lib/dm-migrations/sql/sqlite.rb

Defined Under Namespace

Classes: Column, Table

Instance Method Summary collapse

Instance Method Details

#change_column_type_statement(*args) ⇒ Object

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/dm-migrations/sql/sqlite.rb', line 30

def change_column_type_statement(*args)
  raise NotImplementedError
end

#recreate_databaseObject



16
17
18
19
20
# File 'lib/dm-migrations/sql/sqlite.rb', line 16

def recreate_database
  DataMapper.logger.info "Dropping #{@uri.path}"
  FileUtils.rm_f(@uri.path)
  # do nothing, sqlite will automatically create the database file
end

#supports_schema_transactions?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/dm-migrations/sql/sqlite.rb', line 8

def supports_schema_transactions?
  true
end

#supports_serial?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/dm-migrations/sql/sqlite.rb', line 26

def supports_serial?
  true
end

#table(table_name) ⇒ Object



12
13
14
# File 'lib/dm-migrations/sql/sqlite.rb', line 12

def table(table_name)
  SQL::Sqlite::Table.new(self, table_name)
end

#table_options(opts) ⇒ Object



22
23
24
# File 'lib/dm-migrations/sql/sqlite.rb', line 22

def table_options(opts)
  ''
end