Module: MigrationHelpers::Items::ActionStructure
- Defined in:
- lib/migrate/items/action_structure.rb
Instance Method Summary collapse
Instance Method Details
#create_table_lesli_item_actions_10(resources) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/migrate/items/action_structure.rb', line 36 def create_table_lesli_item_actions_10(resources) table_name, foreign_key = table_name_for_item(resources, :actions) create_table table_name do |t| t.string :title t.datetime :deleted_at, index: true t. end add_reference(table_name, :user, foreign_key: { to_table: :lesli_users }) add_reference(table_name, foreign_key, foreign_key: { to_table: resources }) end |