Sha256: d4b29c9b580670d04d2051d1e6f74fd8ca06664349b36d1e948ac18f7a7a7002

Contents?: true

Size: 784 Bytes

Versions: 1

Compression:

Stored size: 784 Bytes

Contents

class CreateCloudHelpCustomValidations < ActiveRecord::Migration[6.0]
    def change
        table_base_structure = JSON.parse(File.read(Rails.root.join("db","structure","00000401_custom_validations.json")))
        create_table :cloud_help_custom_validations 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_custom_validations, :users, foreign_key: true
        add_reference :cloud_help_custom_validations, :cloud_help_accounts, foreign_key: true, index: { name: "help_custom_validations_accounts" }
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lesli_help-0.1.0 db/tables/0702040110_create_cloud_help_custom_validations.rb