Updated

db/migrate / 20190501120348_create_domains.rb

A
14 lines of codes
1 methods
10.1 complexity/method
1 churn
10.1 complexity
0 duplications
class CreateDomains < ActiveRecord::Migration
  1. CreateDomains has no descriptive comment
def change
  1. CreateDomains#change has approx 8 statements
create_table :domains do |t|
  1. CreateDomains#change has the variable name 't'
t.belongs_to :canonical_domain, index: true
  1. CreateDomains#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
t.string :name, limit: 100, null: false
  1. CreateDomains#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
t.string :strip_characters, limit: 10
  1. CreateDomains#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
t.string :strip_extension, limit: 10, default: "+"
  1. CreateDomains#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
t.timestamps null: false
  1. CreateDomains#change refers to 't' more than self (maybe move it to another class?) Locations: 0 1 2 3 4
end add_index :domains, :name, unique: true add_foreign_key :domains, :domains, column: :canonical_domain_id end end