Updated

db/migrate / 20170612144648_replicate_petition_models_for_archive.rb

D
126 lines of codes
1 methods
120.3 complexity/method
1 churn
120.3 complexity
77 duplications
class ReplicatePetitionModelsForArchive < ActiveRecord::Migration
  1. ReplicatePetitionModelsForArchive has no descriptive comment
def change
  1. ReplicatePetitionModelsForArchive#change has a flog score of 120
  2. ReplicatePetitionModelsForArchive#change has approx 104 statements
create_table :archived_debate_outcomes do |t|
  1. ReplicatePetitionModelsForArchive#change has the variable name 't' Locations: 0 1 2 3 4 5
t.integer :petition_id, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.date :debated_on
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :transcript_url, limit: 500
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :video_url, limit: 500
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.text :overview
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :created_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :created_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :updated_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :updated_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.boolean :debated, default: true, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :commons_image_file_name
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :commons_image_content_type
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.integer :commons_image_file_size
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :commons_image_updated_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
end add_index :archived_debate_outcomes, [:petition_id, :debated_on] add_index :archived_debate_outcomes, :petition_id, unique: true add_index :archived_debate_outcomes, :updated_at add_foreign_key :archived_debate_outcomes, :archived_petitions, column: :petition_id, on_delete: :cascade create_table :archived_government_responses do |t|
  1. ReplicatePetitionModelsForArchive#change has the variable name 't' Locations: 0 1 2 3 4 5
t.integer :petition_id
  1. Similar code found in 2 nodes Locations: 0 1
  2. ReplicatePetitionModelsForArchive#change calls 't.integer :petition_id' 5 times Locations: 0 1 2 3 4
  3. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :summary, limit: 500, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.text :details
  1. ReplicatePetitionModelsForArchive#change calls 't.text :details' 3 times Locations: 0 1 2
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :created_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :created_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :updated_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :updated_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
end add_index :archived_government_responses, :petition_id, unique: true add_index :archived_government_responses, :updated_at add_foreign_key :archived_government_responses, :archived_petitions, column: :petition_id, on_delete: :cascade create_table :archived_notes do |t|
  1. Similar code found in 3 nodes Locations: 0 1 2
  2. ReplicatePetitionModelsForArchive#change has the variable name 't' Locations: 0 1 2 3 4 5
t.integer :petition_id
  1. ReplicatePetitionModelsForArchive#change calls 't.integer :petition_id' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.text :details
  1. ReplicatePetitionModelsForArchive#change calls 't.text :details' 3 times Locations: 0 1 2
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :created_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :created_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :updated_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :updated_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
end add_index :archived_notes, :petition_id, unique: true add_foreign_key :archived_notes, :archived_petitions, column: :petition_id, on_delete: :cascade create_table :archived_petition_emails, force: :cascade do |t|
  1. ReplicatePetitionModelsForArchive#change has the variable name 't' Locations: 0 1 2 3 4 5
t.integer :petition_id
  1. ReplicatePetitionModelsForArchive#change calls 't.integer :petition_id' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :subject, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.text :body
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :sent_by
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :created_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :created_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :updated_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :updated_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
end add_index :archived_petition_emails, :petition_id add_foreign_key :archived_petition_emails, :archived_petitions, column: :petition_id, on_delete: :cascade create_table :archived_rejections, force: :cascade do |t|
  1. ReplicatePetitionModelsForArchive#change has the variable name 't' Locations: 0 1 2 3 4 5
t.integer :petition_id
  1. Similar code found in 2 nodes Locations: 0 1
  2. ReplicatePetitionModelsForArchive#change calls 't.integer :petition_id' 5 times Locations: 0 1 2 3 4
  3. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :code, limit: 50, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.text :details
  1. ReplicatePetitionModelsForArchive#change calls 't.text :details' 3 times Locations: 0 1 2
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :created_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :created_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :updated_at, null: false
  1. ReplicatePetitionModelsForArchive#change calls 't.datetime :updated_at, null: false' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
end add_index :archived_rejections, :petition_id, unique: true add_foreign_key :archived_rejections, :archived_petitions, column: :petition_id, on_delete: :cascade create_table :archived_signatures do |t|
  1. ReplicatePetitionModelsForArchive#change has the variable name 't' Locations: 0 1 2 3 4 5
t.string :name, limit: 255, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :state, limit: 20, default: "pending", null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :perishable_token, limit: 255
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :postcode, limit: 255
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :ip_address, limit: 20
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.integer :petition_id
  1. ReplicatePetitionModelsForArchive#change calls 't.integer :petition_id' 5 times Locations: 0 1 2 3 4
  2. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :created_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :updated_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.boolean :notify_by_email, default: true
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :email, limit: 255
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :unsubscribe_token
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :constituency_id
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :validated_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.integer :number
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.boolean :seen_signed_confirmation_page, default: false, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.string :location_code, limit: 30
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :invalidated_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.integer :invalidation_id
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :government_response_email_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :debate_scheduled_email_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :debate_outcome_email_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.datetime :petition_email_at
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.uuid :uuid
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.boolean :creator, default: false, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
t.boolean :sponsor, default: false, null: false
  1. ReplicatePetitionModelsForArchive#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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
end add_index :archived_signatures, :constituency_id add_index :archived_signatures, [:created_at, :ip_address, :petition_id], name: "index_archived_signatures_on_creation_ip_and_petition_id" add_index :archived_signatures, [:email, :petition_id, :name], unique: true add_index :archived_signatures, :invalidation_id add_index :archived_signatures, [:ip_address, :petition_id] add_index :archived_signatures, [:petition_id, :location_code] add_index :archived_signatures, :petition_id add_index :archived_signatures, [:state, :petition_id] add_index :archived_signatures, :updated_at add_index :archived_signatures, :uuid add_index :archived_signatures, :validated_at add_index :archived_signatures, [:creator, :petition_id] add_index :archived_signatures, [:sponsor, :petition_id] add_foreign_key :archived_signatures, :archived_petitions, column: :petition_id, on_delete: :cascade add_column :archived_petitions, :action, :string, limit: 255 add_column :archived_petitions, :background, :string, limit: 300 add_column :archived_petitions, :additional_details, :text add_column :archived_petitions, :government_response_at, :datetime add_column :archived_petitions, :scheduled_debate_date, :date add_column :archived_petitions, :last_signed_at, :datetime add_column :archived_petitions, :response_threshold_reached_at, :datetime add_column :archived_petitions, :debate_threshold_reached_at, :datetime add_column :archived_petitions, :rejected_at, :datetime add_column :archived_petitions, :debate_outcome_at, :datetime add_column :archived_petitions, :moderation_threshold_reached_at, :datetime add_column :archived_petitions, :debate_state, :string, limit: 30 add_column :archived_petitions, :stopped_at, :datetime add_column :archived_petitions, :special_consideration, :boolean end end