Sha256: 89c448f7d961e3f5fb7ce1c9b089f905ed5b666d0c833ed81f3df61d7766a528
Contents?: true
Size: 381 Bytes
Versions: 10
Compression:
Stored size: 381 Bytes
Contents
require "active_support/concern" module Archiving module Migrations extend ActiveSupport::Concern included do def create_archive_table(table) active_table = quote_table_name(table) archive_table = quote_table_name("#{table}_archive") execute("CREATE TABLE IF NOT EXISTS #{archive_table} LIKE #{active_table}") end end end end
Version data entries
10 entries across 10 versions & 1 rubygems