opf/openproject

View on GitHub
modules/budgets/db/migrate/20200810152654_rename_cost_object_to_budget.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Method up has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def up
    if primary_key_index_name(:cost_objects) != "cost_objects_pkey"
      warn "Found unexpected primary key name. Fixing primary key names..."

      require "./db/migrate/20190502102512_ensure_postgres_index_names"

    Method down has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def down
        rename_column :material_budget_items, :amount, :budget
        rename_column :material_budget_items, :budget_id, :cost_object_id
        rename_column :labor_budget_items, :amount, :budget
        rename_column :labor_budget_items, :budget_id, :cost_object_id

      There are no issues that match your filters.

      Category
      Status