Sha256: 70ca0f3cd19cb43f84708b7249ab8be650a90b9b72940d6a2872d88d5e532153

Contents?: true

Size: 590 Bytes

Versions: 5

Compression:

Stored size: 590 Bytes

Contents

class CreateEcomModelTasks < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_model_tasks do |t|
      t.string :code, null: false
      t.string :name, null: false
      t.string :description
      t.string :ancestry
      t.references :project, index: { name: 'tasks_on_project_indx' }
      t.references :task_template, index: { name: 'tt_on_project_indx' }

      t.timestamps
    end

    add_foreign_key :ecom_model_tasks, :ecom_model_projects, column: :project_id
    add_foreign_key :ecom_model_tasks, :ecom_model_task_templates, column: :task_template_id
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecom_model-2.0.4 db/migrate/20191202103735_create_ecom_model_tasks.rb
ecom_model-2.0.3 db/migrate/20191202103735_create_ecom_model_tasks.rb
ecom_model-2.0.2 db/migrate/20191202103735_create_ecom_model_tasks.rb
ecom_model-2.0.1 db/migrate/20191202103735_create_ecom_model_tasks.rb
ecom_model-2.0.0 db/migrate/20191202103735_create_ecom_model_tasks.rb