Updated

db/migrate / 20160704185825_create_invalidations.rb

A
30 lines of codes
1 methods
30.6 complexity/method
1 churn
30.62 complexity
0 duplications
class CreateInvalidations < ActiveRecord::Migration
  1. CreateInvalidations has no descriptive comment
def change
  1. CreateInvalidations#change has a flog score of 31
  2. CreateInvalidations#change has approx 24 statements
create_table :invalidations do |t|
  1. CreateInvalidations#change has the variable name 't'
t.string :summary, limit: 255, null: false
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.string :details, limit: 10000
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.integer :petition_id
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.string :name, limit: 255
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.string :postcode, limit: 255
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.string :ip_address, limit: 20
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.string :email, limit: 255
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.datetime :created_after
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.datetime :created_before
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.string :constituency_id, limit: 30
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.string :location_code, limit: 30
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.integer :matching_count, null: false, default: 0
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.integer :invalidated_count, null: false, default: 0
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.datetime :enqueued_at, null: true
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.datetime :started_at, null: true
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.datetime :cancelled_at, null: true
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.datetime :completed_at, null: true
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.datetime :counted_at, null: true
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
t.timestamps null: false
  1. CreateInvalidations#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
end add_index :invalidations, :petition_id add_index :invalidations, :started_at add_index :invalidations, :completed_at add_index :invalidations, :cancelled_at end end