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_statementObject

Raises:

  • (NotImplementedError)


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

def change_column_type_statement(*)
  raise NotImplementedError
end

#recreate_databaseObject



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

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

#rename_column_type_statementObject

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/dm-migrations/sql/sqlite.rb', line 33

def rename_column_type_statement(*)
  raise NotImplementedError
end

#supports_schema_transactions?Boolean

Returns:

  • (Boolean)


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

def supports_schema_transactions?
  true
end

#supports_serial?Boolean

Returns:

  • (Boolean)


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

def supports_serial?
  true
end

#table(table_name) ⇒ Object



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

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

#table_options(_opts) ⇒ Object



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

def table_options(_opts)
  ''
end