Sha256: d0c14b2de350fd06dcce7a9a7426d15b034185afd5811104883cfb0564a1e908

Contents?: true

Size: 953 Bytes

Versions: 2

Compression:

Stored size: 953 Bytes

Contents

class CreateCloudDriverEventDiscussions < ActiveRecord::Migration[6.0]
    def change
        create_table :cloud_driver_event_discussions do |t|
            table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000005_discussions.json')))
            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_discussions, :users, foreign_key: true
        add_reference :cloud_driver_event_discussions, :cloud_driver_event_discussions, foreign_key: true, index: { name: "driver_event_discussions_event_discussions" }
        add_reference :cloud_driver_event_discussions, :cloud_driver_events, foreign_key: true, index: { name: "driver_event_discussions_events" }
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lesli_driver-0.2.0 db/tables/0301110510_create_lesli_driver_event_discussions.rb
lesli_driver-0.1.0 db/tables/0301110510_create_lesli_driver_event_discussions.rb