Updated

db/migrate / 20150610091149_create_constituency_petition_journals.rb

B
13 lines of codes
1 methods
6.9 complexity/method
1 churn
6.87 complexity
30 duplications
class CreateConstituencyPetitionJournals < ActiveRecord::Migration
  1. CreateConstituencyPetitionJournals has no descriptive comment
def change
  1. CreateConstituencyPetitionJournals#change has approx 6 statements
create_table :constituency_petition_journals do |t|
  1. Similar code found in 2 nodes Locations: 0 1
  2. CreateConstituencyPetitionJournals#change has the variable name 't'
t.string :constituency_id, null: false
  1. CreateConstituencyPetitionJournals#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.references :petition, null: false
  1. CreateConstituencyPetitionJournals#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.integer :signature_count, default: 0, null: false
  1. CreateConstituencyPetitionJournals#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
t.timestamps null: false
  1. CreateConstituencyPetitionJournals#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3
end add_index :constituency_petition_journals, [:petition_id, :constituency_id], unique: true, name: 'idx_constituency_petition_journal_uniqueness' end end