Sha256: a2875a825954433a4b639b16a70122ff31700d346b3e9262a791fda0dfb0922a

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

class CreateLesliCalendarEventFiles < ActiveRecord::Migration[6.0]
    def change
        table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000006_files.json')))
        create_table :cloud_driver_event_files 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_files, :users, foreign_key: true
        add_reference :cloud_driver_event_files, :cloud_driver_events, foreign_key: true
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lesli_calendar-0.2.2 db/tables/0301110610_create_lesli_driver_event_files.rb
lesli_calendar-0.2.1 db/tables/0301110610_create_lesli_driver_event_files.rb