Updated

db/migrate / 20150820152623_create_country_petition_journals.rb

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