Sha256: 06f56dcd96e4b8badd9f389fb3a68370f9dff67e1a71a84ec3208d5f51b0b665

Contents?: true

Size: 1.98 KB

Versions: 35

Compression:

Stored size: 1.98 KB

Contents

class CreateEcomCoreProjects < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_projects do |t|
      t.string :name, null: false
      t.string :description
      t.string :location, null: false
      t.string :objective
      t.string :project_scope
      t.references :employer,
                   null: false,
                   index: { name: 'employer_on_projects_indx' },
                   foreign_key: { to_table: :ecom_core_stakeholders }
      t.references :contractor,
                   null: false,
                   index: { name: 'employer_on_contractor_indx' },
                   foreign_key: { to_table: :ecom_core_stakeholders }
      t.references :consultant,
                   null: false,
                   index: { name: 'employer_on_consultant_indx' },
                   foreign_key: { to_table: :ecom_core_stakeholders }
      t.references :project_manager,
                   null: false,
                   index: { name: 'employer_on_pm_indx' },
                   foreign_key: { to_table: :ecom_core_stakeholders }
      t.references :task_template_type,
                   null: false,
                   index: { name: 'employer_on_tt_indx' },
                   foreign_key: { to_table: :ecom_core_task_template_types }
      t.string :contract_number, null: false
      t.date :date_contract_signed, null: false
      t.date :commencement_date, null: false
      t.date :completion_date, null: false
      t.float :contract_amount, null: false
      t.float :advance_payment, null: false
      t.float :retention, null: false
      t.string :remark
      t.references :currency,
                   null: false,
                   index: { name: 'employer_on_currency_indx' },
                   foreign_key: { to_table: :ecom_core_currencies }
      t.references :company,
                   null: false,
                   index: { name: 'project_on_company_indx' },
                   foreign_key: { to_table: :ecom_core_companies }

      t.timestamps
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
ecom_core-1.3.14 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.13 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.12 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.11 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.10 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.9 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.8 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.7 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.6 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.5 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.4 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.3 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.2 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.1 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.3.0 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.2.36 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.2.35 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.2.34 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.2.33 db/migrate/20191201145848_create_ecom_core_projects.rb
ecom_core-1.2.32 db/migrate/20191201145848_create_ecom_core_projects.rb