Updated

db/migrate / 20150615151103_create_debate_outcomes.rb

A
16 lines of codes
1 methods
11.0 complexity/method
1 churn
10.95 complexity
0 duplications
class CreateDebateOutcomes < ActiveRecord::Migration
  1. CreateDebateOutcomes has no descriptive comment
def change
  1. CreateDebateOutcomes#change has approx 9 statements
create_table :debate_outcomes do |t|
  1. CreateDebateOutcomes#change has the variable name 't'
t.references :petition, null: false
  1. CreateDebateOutcomes#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5
t.date :debated_on, null: false
  1. CreateDebateOutcomes#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5
t.string :transcript_url, limit: 500
  1. CreateDebateOutcomes#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5
t.string :video_url, limit: 500
  1. CreateDebateOutcomes#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5
t.text :overview
  1. CreateDebateOutcomes#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5
t.timestamps null: false
  1. CreateDebateOutcomes#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5
end add_index :debate_outcomes, [:petition_id], unique: true add_index :debate_outcomes, [:petition_id, :debated_on] end end