Sha256: 8a0c283e232e0d0b49258feb087b10d499fa8dfb621fb841afcc346cf8b11358

Contents?: true

Size: 678 Bytes

Versions: 1

Compression:

Stored size: 678 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lesli_help-0.1.0 db/tables/0702110610_create_cloud_help_sla_files.rb