Sha256: c00805cf84e85a169f00228db0d8a0feb923035e2b52853d0546a991fd1e9f44
Contents?: true
Size: 831 Bytes
Versions: 2
Compression:
Stored size: 831 Bytes
Contents
class CreateCloudDriverEventSubscribers < ActiveRecord::Migration[6.0] def change table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000007_subscribers.json'))) create_table :cloud_driver_event_subscribers 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_subscribers, :users, foreign_key: true, index: { name: 'driver_event_subscribers_users' } add_reference :cloud_driver_event_subscribers, :cloud_driver_events, foreign_key: true, index: { name: 'driver_event_subscribers_events' } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lesli_driver-0.2.0 | db/tables/0301110710_create_lesli_driver_event_subscribers.rb |
lesli_driver-0.1.0 | db/tables/0301110710_create_lesli_driver_event_subscribers.rb |