Module: DataMapper::Migrations::PostgresAdapter

Includes:
DataObjectsAdapter, SQL
Defined in:
lib/dm-migrations/adapters/dm-postgres-adapter.rb

Defined Under Namespace

Modules: ClassMethods, SQL

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SQL

#postgres_version, #property_schema_hash, #schema_name, #supports_drop_table_if_exists?, #without_notices

Methods included from DataObjectsAdapter

#dialect, #field_exists?, #storage_exists?

Methods included from DataObjectsAdapter::SQL

#alter_table_add_column_statement, #create_index_statements, #create_table_statement, #create_unique_index_statements, #drop_table_statement, #indexes, #property_schema_hash, #property_schema_statement, #schema_name, #supports_drop_table_if_exists?, #supports_serial?, #unique_indexes

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.



11
12
13
14
# File 'lib/dm-migrations/adapters/dm-postgres-adapter.rb', line 11

def self.included(base)
  base.extend DataObjectsAdapter::ClassMethods
  base.extend ClassMethods
end

Instance Method Details

#create_model_storage(model) ⇒ Object



22
23
24
# File 'lib/dm-migrations/adapters/dm-postgres-adapter.rb', line 22

def create_model_storage(model)
  without_notices { super }
end

#destroy_model_storage(model) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/dm-migrations/adapters/dm-postgres-adapter.rb', line 27

def destroy_model_storage(model)
  if supports_drop_table_if_exists?
    without_notices { super }
  else
    super
  end
end

#upgrade_model_storage(model) ⇒ Object



17
18
19
# File 'lib/dm-migrations/adapters/dm-postgres-adapter.rb', line 17

def upgrade_model_storage(model)
  without_notices { super }
end