Skip to content

Commit

Permalink
Merge pull request #43 from JamesGlover/ss463_add_phenotype_column_to…
Browse files Browse the repository at this point in the history
…_samples_table

Ss463 add phenotype column to samples table
  • Loading branch information
James Glover authored Oct 26, 2016
2 parents 088f194 + a133195 commit 3a2cc61
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class AddPhenotypeColumnToSampleTable < ActiveRecord::Migration
def change
change_table :sample do |t|
t.string 'phenotype', comment: 'The phenotype of the sample as described in Sequencescape'
end
end
end
3 changes: 3 additions & 0 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ CREATE TABLE `sample` (
`strain` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`consent_withdrawn` tinyint(1) NOT NULL DEFAULT '0',
`donor_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`phenotype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The phenotype of the sample as described in Sequencescape',
PRIMARY KEY (`id_sample_tmp`),
UNIQUE KEY `index_sample_on_id_sample_lims_and_id_lims` (`id_sample_lims`,`id_lims`),
UNIQUE KEY `sample_uuid_sample_lims_index` (`uuid_sample_lims`),
Expand Down Expand Up @@ -336,5 +337,7 @@ INSERT INTO schema_migrations (version) VALUES ('20160420084130');

INSERT INTO schema_migrations (version) VALUES ('20160422095926');

INSERT INTO schema_migrations (version) VALUES ('20160621125538');

INSERT INTO schema_migrations (version) VALUES ('20160810093024');

1 change: 1 addition & 0 deletions spec/models/sample_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"name" => "name",
"reference_genome" => "reference genome",
"organism" => "organism",
"phenotype"=>"healthy",
"consent_withdrawn" => true,
"sample_ebi_accession_number" => "accession number",
"sample_common_name" => "common name",
Expand Down

0 comments on commit 3a2cc61

Please sign in to comment.