Updated

db/migrate / 20150612095611_create_sites.rb

A
21 lines of codes
1 methods
22.9 complexity/method
1 churn
22.87 complexity
0 duplications
class CreateSites < ActiveRecord::Migration
  1. CreateSites has no descriptive comment
def change
  1. CreateSites#change has approx 16 statements
create_table :sites do |t|
  1. CreateSites#change has the variable name 't'
t.string :title, limit: 50, null: false, default: 'Petition parliament'
  1. CreateSites#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
t.string :url, limit: 50, null: false, default: 'https://petition.parliament.uk'
  1. CreateSites#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
t.string :email_from, limit: 50, null: false, default: 'no-reply@petition.parliament.uk'
  1. CreateSites#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
t.string :username, limit: 30
  1. CreateSites#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
t.string :password_digest, limit: 60
  1. CreateSites#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
t.boolean :enabled, null: false, default: true
  1. CreateSites#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
t.boolean :protected, null: false, default: false
  1. CreateSites#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
t.integer :petition_duration, null: false, default: 6
  1. CreateSites#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
t.integer :minimum_number_of_sponsors, null: false, default: 5
  1. CreateSites#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
t.integer :maximum_number_of_sponsors, null: false, default: 20
  1. CreateSites#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
t.integer :threshold_for_moderation, null: false, default: 5
  1. CreateSites#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
t.integer :threshold_for_response, null: false, default: 10000
  1. CreateSites#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
t.integer :threshold_for_debate, null: false, default: 100000
  1. CreateSites#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
t.datetime :last_checked_at
  1. CreateSites#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
t.timestamps null: false
  1. CreateSites#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
end end end