module Skr::DB::CommandRecorder
Public Instance Methods
create_skr_table(*args)
click to toggle source
# File lib/skr/db/migration_helpers.rb, line 128 def create_skr_table(*args) record(:create_skr_table, args) end
drop_skr_table(*args)
click to toggle source
# File lib/skr/db/migration_helpers.rb, line 132 def drop_skr_table(*args) record(:drop_skr_table, args) end
invert_create_skr_table(args)
click to toggle source
# File lib/skr/db/migration_helpers.rb, line 136 def invert_create_skr_table(args) from_table, to_table, add_options = *args add_options ||= {} if add_options[:name] options = {name: add_options[:name]} elsif add_options[:column] options = {column: add_options[:column]} else options = to_table end [:drop_skr_table, [from_table, options]] end
invert_skr_add_index(args)
click to toggle source
# File lib/skr/db/migration_helpers.rb, line 152 def invert_skr_add_index(args) table, column = *args [:remove_skr_index, [table, column]] end
skr_add_index(*args)
click to toggle source
# File lib/skr/db/migration_helpers.rb, line 149 def skr_add_index(*args) record(:skr_add_index,args) end