Sha256: 4a32f23bf903d09d2a1c3ff06a0098d9d3cde9dbe16cd06e8ba5c83832478a71

Contents?: true

Size: 643 Bytes

Versions: 2

Compression:

Stored size: 643 Bytes

Contents

class CreateCloudDriverEventActivities < ActiveRecord::Migration[6.0]
    def change
        table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000004_activities.json')))
        create_table :cloud_driver_event_activities 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_activities, :cloud_driver_events, foreign_key: true
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lesli_driver-0.2.0 db/tables/0301110410_create_lesli_driver_event_activities.rb
lesli_driver-0.1.0 db/tables/0301110410_create_lesli_driver_event_activities.rb