Skip to content

Commit

Permalink
Merge pull request #637 from sanger/add-insert-size-to-aliquots
Browse files Browse the repository at this point in the history
Added insert size to aliquot table.
  • Loading branch information
stevieing authored Jul 8, 2024
2 parents e213c91 + 7c812b4 commit 940c24b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions db/migrate/20240708081135_add_insert_size_to_aliquots.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class AddInsertSizeToAliquots < ActiveRecord::Migration[7.0]
def up
add_column :aliquot, :insert_size, :integer, comment: 'The size of the insert in base pairs'
end

def down
remove_column :aliquot, :insert_size, :integer
end
end
3 changes: 2 additions & 1 deletion 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[7.0].define(version: 2024_06_14_135209) do
ActiveRecord::Schema[7.0].define(version: 2024_07_08_081135) do
create_table "aliquot", charset: "utf8mb3", collation: "utf8mb3_unicode_ci", force: :cascade do |t|
t.string "id_lims", null: false, comment: "The LIMS system that the aliquot was created in"
t.string "lims_uuid", null: false, comment: "The UUID of the aliquot in the LIMS system"
Expand All @@ -25,6 +25,7 @@
t.datetime "last_updated", null: false, comment: "The date and time that the aliquot was last updated"
t.datetime "recorded_at", null: false, comment: "The date and time that the aliquot was recorded"
t.datetime "created_at", null: false, comment: "The date and time that this record was created"
t.integer "insert_size", comment: "The size of the insert in base pairs"
end

create_table "bmap_flowcell", primary_key: "id_bmap_flowcell_tmp", id: :integer, charset: "utf8mb3", collation: "utf8mb3_unicode_ci", force: :cascade do |t|
Expand Down
3 changes: 2 additions & 1 deletion spec/models/aliquots_spec.rb → spec/models/aliquot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
require 'spec_helper'

describe Aliquot do
context 'aliquots' do
context 'aliquot' do
let(:example_lims) { 'example' }

let(:json) do
{ 'id_lims' => 'example',
'aliquot_type' => 'DNA',
'volume' => 5.43,
'concentration' => 2.34,
'insert_size' => 100,
'lims_uuid' => '000000-0000-0000-0000-0000000002',
'source_type' => 'library',
'source_barcode' => 'PR-rna-00000001_H12',
Expand Down

0 comments on commit 940c24b

Please sign in to comment.