Module: DataMapper::Migrations::Sqlite3Adapter
- Includes:
- SQL
- Defined in:
- lib/dm-core/migrations.rb
Overview
module PostgresAdapter
Defined Under Namespace
Modules: ClassMethods, SQL
Class Method Summary collapse
-
.included(base) ⇒ Object
private
TODO: document.
Instance Method Summary collapse
-
#field_exists?(storage_name, column_name) ⇒ Boolean
TODO: document.
-
#storage_exists?(storage_name) ⇒ Boolean
TODO: document.
Methods included from SQL
#create_table_statement, #property_schema_statement, #query_table, #sqlite_version, #supports_drop_table_if_exists?, #supports_serial?
Class Method Details
.included(base) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
TODO: document
726 727 728 |
# File 'lib/dm-core/migrations.rb', line 726 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#field_exists?(storage_name, column_name) ⇒ Boolean
TODO: document
738 739 740 741 742 |
# File 'lib/dm-core/migrations.rb', line 738 def field_exists?(storage_name, column_name) query_table(storage_name).any? do |row| row.name == column_name end end |
#storage_exists?(storage_name) ⇒ Boolean
TODO: document
732 733 734 |
# File 'lib/dm-core/migrations.rb', line 732 def storage_exists?(storage_name) query_table(storage_name).size > 0 end |