Updated

db/migrate / 20150814111100_create_constituencies.rb

A
17 lines of codes
1 methods
14.7 complexity/method
1 churn
14.73 complexity
0 duplications
class CreateConstituencies < ActiveRecord::Migration
  1. CreateConstituencies has no descriptive comment
def change
  1. CreateConstituencies#change has approx 11 statements
create_table :constituencies do |t|
  1. CreateConstituencies#change has the variable name 't'
t.string :name, limit: 100, null: false
  1. CreateConstituencies#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7
t.string :slug, limit: 100, null: false
  1. CreateConstituencies#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7
t.string :external_id, limit: 30, null: false
  1. CreateConstituencies#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7
t.string :ons_code, limit: 10, null: false
  1. CreateConstituencies#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7
t.string :mp_id, limit: 30
  1. CreateConstituencies#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7
t.string :mp_name, limit: 100
  1. CreateConstituencies#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7
t.date :mp_date
  1. CreateConstituencies#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7
t.timestamps null: false
  1. CreateConstituencies#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7
end add_index :constituencies, :slug, unique: true add_index :constituencies, :external_id, unique: true end end