Sha256: 0fcf7e013b2dbb7632c0680405986a037e56fd3f783da38383165c968f34a371
Contents?: true
Size: 825 Bytes
Versions: 1
Compression:
Stored size: 825 Bytes
Contents
class CreateCloudHelpTicketSubscribers < ActiveRecord::Migration[6.0] def change table_base_structure = JSON.parse(File.read(Rails.root.join("db","structure","00000007_subscribers.json"))) create_table :cloud_help_ticket_subscribers 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_ticket_subscribers, :cloud_help_tickets, foreign_key: true, index: { name: "help_ticket_subscribers_tickets" } add_reference :cloud_help_ticket_subscribers, :users, foreign_key: true, index: { name: "help_ticket_subscribers_users" } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lesli_help-0.1.0 | db/tables/0702100710_create_cloud_help_ticket_subscribers.rb |