Sha256: 4f7ff35a366c68f1e3c48dbb26880fb48d7606ca76c31a0b8e2d22f7e594a9ac
Contents?: true
Size: 955 Bytes
Versions: 2
Compression:
Stored size: 955 Bytes
Contents
class CreateLesliCalendarEventDiscussions < 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_calendar-0.2.2 | db/tables/0301110510_create_lesli_driver_event_discussions.rb |
lesli_calendar-0.2.1 | db/tables/0301110510_create_lesli_driver_event_discussions.rb |