Module: SQL::Sqlite3
- Defined in:
- lib/mack-data_mapper/dm_patches/migrations.rb,
lib/gems/dm-migrations-0.9.9/lib/sql/sqlite3.rb
Overview
:nodoc:
Defined Under Namespace
Instance Method Summary collapse
- #property_schema_statement(schema) ⇒ Object
- #recreate_database ⇒ Object
- #supports_schema_transactions? ⇒ Boolean
- #supports_serial? ⇒ Boolean
- #table(table_name) ⇒ Object
Instance Method Details
#property_schema_statement(schema) ⇒ Object
14 15 16 17 18 |
# File 'lib/mack-data_mapper/dm_patches/migrations.rb', line 14 def property_schema_statement(schema) statement = super statement << ' PRIMARY KEY AUTOINCREMENT' if supports_serial? && schema[:serial] statement end |
#recreate_database ⇒ Object
14 15 16 17 18 |
# File 'lib/gems/dm-migrations-0.9.9/lib/sql/sqlite3.rb', line 14 def recreate_database DataMapper.logger.info "Dropping #{@uri.path}" system "rm #{@uri.path}" # do nothing, sqlite will automatically create the database file end |
#supports_schema_transactions? ⇒ Boolean
6 7 8 |
# File 'lib/gems/dm-migrations-0.9.9/lib/sql/sqlite3.rb', line 6 def supports_schema_transactions? true end |
#supports_serial? ⇒ Boolean
20 21 22 |
# File 'lib/gems/dm-migrations-0.9.9/lib/sql/sqlite3.rb', line 20 def supports_serial? true end |