Sha256: 061aa5656f22834bf8efb75c78891160c225b77511d8b3991002b06cdc27edcb
Contents?: true
Size: 838 Bytes
Versions: 1
Compression:
Stored size: 838 Bytes
Contents
class CreateCloudHelpCustomValidationFields < ActiveRecord::Migration[6.0] def change table_base_structure = JSON.parse(File.read(Rails.root.join("db","structure","00000403_custom_validation_fields.json"))) create_table :cloud_help_custom_validation_fields 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_validation_fields, :users, foreign_key: true add_reference :cloud_help_custom_validation_fields, :cloud_help_custom_validations, foreign_key: true, index: { name: "cloud_help_custom_validation_fields_validations" } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lesli_help-0.1.0 | db/tables/0702040310_create_cloud_help_custom_validation_fields.rb |