Class: StrongMigrations::Adapters::AbstractAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/strong_migrations/adapters/abstract_adapter.rb

Direct Known Subclasses

MySQLAdapter, PostgreSQLAdapter

Instance Method Summary collapse

Constructor Details

#initialize(checker) ⇒ AbstractAdapter

Returns a new instance of AbstractAdapter.



4
5
6
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 4

def initialize(checker)
  @checker = checker
end

Instance Method Details

#add_column_default_safe?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 27

def add_column_default_safe?
  false
end

#auto_incrementing_typesObject



39
40
41
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 39

def auto_incrementing_types
  ["primary_key"]
end

#change_type_safe?(table, column, type, options, existing_column, existing_type) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 31

def change_type_safe?(table, column, type, options, existing_column, existing_type)
  false
end

#check_lock_timeout(limit) ⇒ Object



23
24
25
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 23

def check_lock_timeout(limit)
  # do nothing
end

#min_versionObject



12
13
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 12

def min_version
end

#nameObject



8
9
10
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 8

def name
  "Unknown"
end

#rewrite_blocksObject



35
36
37
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 35

def rewrite_blocks
  "reads and writes"
end

#set_lock_timeout(timeout) ⇒ Object



19
20
21
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 19

def set_lock_timeout(timeout)
  # do nothing
end

#set_statement_timeout(timeout) ⇒ Object



15
16
17
# File 'lib/strong_migrations/adapters/abstract_adapter.rb', line 15

def set_statement_timeout(timeout)
  # do nothing
end