Skip to content

Commit

Permalink
Removed unused contig attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahW91 committed Oct 18, 2018
1 parent e687c44 commit b0167fa
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
10 changes: 8 additions & 2 deletions app/controllers/contigs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,14 @@ def set_contig
end

# Never trust parameters from the scary internet, only allow the white list through.
#TODO mira and marker only used by fastq export
#TODO contig_names is only used by contig compare feature
#TODO filename and fastastring are only used by change via script action
#TODO: isolate_name used in form for contig, but cant that be done via id?
def contig_params
params.require(:contig).permit(:mira, :marker, :overlap_length, :allowed_mismatch_percent, :imported, :contig_names, :filename, :fastastring, :comment, :assembled, :name, :consensus, :marker_id, :isolate_id, :marker_sequence_id, :chromatograms, :term,
:isolate_name, :verified, project_ids: [])
params.require(:contig).permit(:mira, :marker, :overlap_length, :allowed_mismatch_percent, :imported, :contig_names,
:filename, :fastastring, :comment, :assembled, :name, :consensus, :marker_id,
:isolate_id, :marker_sequence_id, :term, :isolate_name, :verified,
project_ids: [])
end
end
1 change: 0 additions & 1 deletion app/workers/compare_contigs.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# TODO: Marked for removal
class CompareContigs
include Sidekiq::Worker

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class RemovePartialConsTextColumnsFromContigs < ActiveRecord::Migration[5.0]
def change
remove_column :contigs, :partial_cons1, :text
remove_column :contigs, :partial_cons2, :text
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class RemoveUnusedColumnsFromContigs < ActiveRecord::Migration[5.0]
def change
remove_column :contigs, :aligned_cons, :string
remove_column :contigs, :overlaps, :integer
end
end
6 changes: 1 addition & 5 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20181017085059) do
ActiveRecord::Schema.define(version: 20181018094614) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -72,11 +72,7 @@
t.integer "isolate_id"
t.integer "marker_id"
t.boolean "assembled"
t.integer "overlaps"
t.text "partial_cons1"
t.text "partial_cons2"
t.boolean "assembly_tried"
t.string "aligned_cons", limit: 255
t.text "fas"
t.boolean "verified", default: false
t.integer "verified_by"
Expand Down

0 comments on commit b0167fa

Please sign in to comment.