Updated

db/migrate / 20150805142254_create_petition_emails.rb

A
14 lines of codes
1 methods
9.1 complexity/method
1 churn
9.06 complexity
0 duplications
class CreatePetitionEmails < ActiveRecord::Migration
  1. CreatePetitionEmails has no descriptive comment
def change
  1. CreatePetitionEmails#change has approx 8 statements
create_table :petition_emails do |t|
  1. CreatePetitionEmails#change has the variable name 't'
t.references :petition
  1. CreatePetitionEmails#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
t.string :subject, null: false
  1. CreatePetitionEmails#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
t.text :body
  1. CreatePetitionEmails#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
t.string :sent_by
  1. CreatePetitionEmails#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
t.timestamps null: false
  1. CreatePetitionEmails#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
end add_index :petition_emails, :petition_id add_foreign_key :petition_emails, :petitions, on_delete: :cascade end end