class CreateRemexifyLogowners
Public Class Methods
down()
click to toggle source
# File lib/generators/active_record/templates/create_remexify_logowners.rb, line 16 def self.down # we don't want to make assumption of your roll back, please # by all mean edit it. # drop_table :<%= table_name %>_owner raise ActiveRecord::IrreversibleMigration end
up()
click to toggle source
# File lib/generators/active_record/templates/create_remexify_logowners.rb, line 2 def self.up create_table :<%= table_name %>_owners do |t| t.string :log_md5, null: false t.string :identifier_id, null: false # this can be used to store additional info, such as the class of identifier_id above, or anything else # you may read the gem documentation on how to use it. t.string :param1 t.string :param2 t.string :param3 end add_index :<%= table_name %>_owners, [:log_md5, :identifier_id], unique: true end