Module: MigrationHelpers::Items::SubscriberStructure

Defined in:
lib/migrate/items/subscriber_structure.rb

Instance Method Summary collapse

Instance Method Details

#create_table_lesli_item_subscribers_10(resources) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/migrate/items/subscriber_structure.rb', line 36

def create_table_lesli_item_subscribers_10(resources)

    table_name, foreign_key = table_name_for_item(resources, :subscribers)

    create_table table_name do |t|
        t.timestamps
    end

    add_reference(table_name, :user, foreign_key: { to_table: :lesli_users })
    add_reference(table_name, foreign_key, foreign_key: { to_table: resources })
end