Updated

db/migrate / 20150701151007_create_rejections.rb

B
13 lines of codes
1 methods
8.2 complexity/method
1 churn
8.21 complexity
38 duplications
class CreateRejections < ActiveRecord::Migration
  1. CreateRejections has no descriptive comment
def change
  1. Similar code found in 2 nodes Locations: 0 1
  2. CreateRejections#change has approx 7 statements
create_table :rejections do |t|
  1. CreateRejections#change has the variable name 't'
t.references :petition
  1. CreateRejections#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.string :code, limit: 50, null: false
  1. CreateRejections#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.text :details
  1. CreateRejections#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.timestamps null: false
  1. CreateRejections#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
end add_index :rejections, :petition_id, unique: true add_foreign_key :rejections, :petitions, on_delete: :cascade end end