Skip to content

Commit

Permalink
Merge pull request #678 from sanger/675-y24-316-as-developers-we-want…
Browse files Browse the repository at this point in the history
…-to-increase-the-size-of-the-id-sample-lims-column-in-the-sample-table-to-255

Increase size of id_sample_lims column in sample table
  • Loading branch information
stevieing authored Sep 20, 2024
2 parents 022c3cf + f3374a4 commit 48c7b68
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class IncreaseSizeOfIdSampleLimsColumnInSample < ActiveRecord::Migration[7.0]
def up
change_column :sample, :id_sample_lims, :string, limit: 255
end

def down
change_column :sample, :id_sample_lims, :string, limit: 20
end
end
6 changes: 3 additions & 3 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[7.0].define(version: 2024_08_14_125331) do
ActiveRecord::Schema[7.0].define(version: 2024_09_19_134424) 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 "aliquot_uuid", null: false, comment: "The UUID of the aliquot in the LIMS system"
Expand Down Expand Up @@ -305,7 +305,7 @@
create_table "sample", primary_key: "id_sample_tmp", id: { type: :integer, unsigned: true }, charset: "utf8mb3", collation: "utf8mb3_unicode_ci", force: :cascade do |t|
t.string "id_lims", limit: 10, null: false, comment: "LIM system identifier, e.g. CLARITY-GCLP, SEQSCAPE"
t.string "uuid_sample_lims", limit: 36, comment: "LIMS-specific sample uuid"
t.string "id_sample_lims", limit: 20, null: false, comment: "LIMS-specific sample identifier"
t.string "id_sample_lims", null: false, comment: "LIMS-specific sample identifier"
t.datetime "last_updated", precision: nil, null: false, comment: "Timestamp of last update"
t.datetime "recorded_at", precision: nil, null: false, comment: "Timestamp of warehouse update"
t.datetime "deleted_at", precision: nil, comment: "Timestamp of sample deletion"
Expand Down Expand Up @@ -463,7 +463,7 @@
t.string "programme"
t.index ["accession_number"], name: "study_accession_number_index"
t.index ["id_lims", "id_study_lims"], name: "study_id_lims_id_study_lims_index", unique: true
t.index ["id_study_lims"], name: "index_study_on_id_study_lims", unique: false
t.index ["id_study_lims"], name: "index_study_on_id_study_lims"
t.index ["name"], name: "study_name_index"
t.index ["uuid_study_lims"], name: "study_uuid_study_lims_index", unique: true
end
Expand Down
2 changes: 1 addition & 1 deletion db/views_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
'lh_biosero_cp_error_recovered_destination_plate_completed','lh_biosero_cp_error_recovered_destination_plate_partial_completed'
)
SQL
)
)
2 changes: 1 addition & 1 deletion spec/models/sample_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

let(:json) do
{
'id' => 1,
'id' => '1' * 255.to_i,
'name' => 'name',
'reference_genome' => 'reference genome',
'organism' => 'organism',
Expand Down

0 comments on commit 48c7b68

Please sign in to comment.