Class: StrongMigrations::Adapters::MariaDBAdapter
Instance Method Summary
collapse
#analyze_table, #change_type_safe?, #check_lock_timeout, #rewrite_blocks, #set_lock_timeout, #strict_mode?
#auto_incrementing_types, #change_type_safe?, #check_lock_timeout, #initialize, #rewrite_blocks, #set_lock_timeout
Instance Method Details
#add_column_default_safe? ⇒ Boolean
27
28
29
|
# File 'lib/strong_migrations/adapters/mariadb_adapter.rb', line 27
def add_column_default_safe?
true
end
|
#min_version ⇒ Object
8
9
10
|
# File 'lib/strong_migrations/adapters/mariadb_adapter.rb', line 8
def min_version
"10.5"
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/strong_migrations/adapters/mariadb_adapter.rb', line 4
def name
"MariaDB"
end
|
#server_version ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/strong_migrations/adapters/mariadb_adapter.rb', line 12
def server_version
@server_version ||= begin
target_version(StrongMigrations.target_mariadb_version) do
select_all("SELECT VERSION()").first["VERSION()"].split("-").first
end
end
end
|
#set_statement_timeout(timeout) ⇒ Object
20
21
22
23
24
25
|
# File 'lib/strong_migrations/adapters/mariadb_adapter.rb', line 20
def set_statement_timeout(timeout)
timeout = timeout.value if timeout.is_a?(ActiveSupport::Duration)
select_all("SET max_statement_time = #{connection.quote(timeout)}")
end
|