module Skr::Core::DB::CommandRecorder

Public Instance Methods

create_skr_table(*args) click to toggle source
# File lib/skr/core/db/migration_helpers.rb, line 126
def create_skr_table(*args)
    record(:create_skr_table, args)
end
drop_skr_table(*args) click to toggle source
# File lib/skr/core/db/migration_helpers.rb, line 130
def drop_skr_table(*args)
    record(:drop_skr_table, args)
end
invert_create_skr_table(args) click to toggle source
# File lib/skr/core/db/migration_helpers.rb, line 134
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/core/db/migration_helpers.rb, line 150
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/core/db/migration_helpers.rb, line 147
def skr_add_index(*args)
    record(:skr_add_index,args)
end