Sha256: acc09887cc73d874c6e89e3fa8ea3220b4f6b2ba56e018ab5f928dcb754a6a38
Contents?: true
Size: 756 Bytes
Versions: 2
Compression:
Stored size: 756 Bytes
Contents
class CreateCloudDriverEventActions < ActiveRecord::Migration[6.0] def change table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000003_actions.json'))) create_table :cloud_driver_event_actions do |t| table_base_structure.each do |column| t.send( column["type"].parameterize.underscore.to_sym, column["name"].parameterize.underscore.to_sym ) end t.timestamps end add_reference :cloud_driver_event_actions, :users, foreign_key: true add_reference :cloud_driver_event_actions, :cloud_driver_events, foreign_key: true, index: { name: "driver_event_actions_events" } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lesli_driver-0.2.0 | db/tables/0301110310_create_lesli_driver_event_actions.rb |
lesli_driver-0.1.0 | db/tables/0301110310_create_lesli_driver_event_actions.rb |