GitHub PullRequestReviewCommentEvent at 2014-04-08 22:40:59
Repository: qiita
Actor: teravest
Payload: {"comment":{"url":"https://api.github.com/repos/biocore/qiita/pulls/comments/11415302","id":11415302,"diff_hunk":"@@ -0,0 +1,572 @@\n+CREATE SCHEMA qiita;\n+\n+CREATE TABLE qiita.analysis_status ( \n+\tanalysis_status_id   bigserial  NOT NULL,\n+\tstatus               varchar  NOT NULL,\n+\tCONSTRAINT pk_analysis_status PRIMARY KEY ( analysis_status_id )\n+ );\n+\n+CREATE TABLE qiita.command ( \n+\tcommand_id           bigserial  NOT NULL,\n+\tname                 varchar  NOT NULL,\n+\tcommand              varchar  NOT NULL,\n+\tCONSTRAINT pk_function PRIMARY KEY ( command_id )\n+ );\n+\n+COMMENT ON TABLE qiita.command IS 'Available commands for jobs';\n+\n+COMMENT ON COLUMN qiita.command.command_id IS 'Unique identifier for function';\n+\n+COMMENT ON COLUMN qiita.command.command IS 'what command to call to run this function';\n+\n+CREATE TABLE qiita.controlled_vocabularies ( \n+\tcontrolled_vocab_id  bigserial  NOT NULL,\n+\tvocab_name           varchar(100)  NOT NULL,\n+\tCONSTRAINT pk_controlled_vocabularies PRIMARY KEY ( controlled_vocab_id )\n+ );\n+\n+CREATE TABLE qiita.data_type ( \n+\tdata_type_id         bigserial  NOT NULL,\n+\tdata_type            varchar  NOT NULL,\n+\tCONSTRAINT pk_data_type PRIMARY KEY ( data_type_id )\n+ );\n+\n+COMMENT ON COLUMN qiita.data_type.data_type IS 'what datatype (16s, metabolome, etc) job is run on.';\n+\n+CREATE TABLE qiita.filetype ( \n+\tfiletype_id          bigserial  NOT NULL,\n+\ttype                 varchar  NOT NULL,\n+\tCONSTRAINT pk_filetype PRIMARY KEY ( filetype_id )\n+ );\n+\n+CREATE TABLE qiita.investigation ( \n+\tinvestigation_id     bigserial  NOT NULL,\n+\tdescription          bigserial  NOT NULL,\n+\tcontact_person_id    integer  ,\n+\tCONSTRAINT pk_investigation PRIMARY KEY ( investigation_id )\n+ );\n+\n+COMMENT ON TABLE qiita.investigation IS 'Overarching investigation information\n+One investigation can have multiple studies under it';\n+\n+COMMENT ON COLUMN qiita.investigation.description IS 'describes the overarching goal of the investigation';\n+\n+CREATE TABLE qiita.job_status ( \n+\tjob_status_id        bigserial  NOT NULL,\n+\tstatus               varchar  NOT NULL,\n+\tCONSTRAINT pk_job_status PRIMARY KEY ( job_status_id )\n+ );\n+\n+CREATE TABLE qiita.mixs_field_description ( \n+\tcolumn_name          varchar(100)  NOT NULL,\n+\tdata_type            varchar(100)  ,\n+\tdesc_or_value        varchar(100)  ,\n+\tdefinition           varchar(100)  ,\n+\tmin_length           integer  ,\n+\tactive               integer  ,\n+\tCONSTRAINT pk_column_dictionary UNIQUE ( column_name ) ,\n+\tCONSTRAINT pk_column_dictionary_0 PRIMARY KEY ( column_name )\n+ );\n+\n+CREATE TABLE qiita.ontology ( \n+\tontology_id          bigserial  NOT NULL,\n+\tshortname            varchar(100)  NOT NULL,\n+\tfully_loaded         bool  NOT NULL,\n+\tfullname             varchar(255)  ,\n+\tquery_url            varchar(255)  ,\n+\tsource_url           varchar(255)  ,\n+\tdefinition           text  ,\n+\tload_date            date  NOT NULL,\n+\tversion              varchar(128)  ,\n+\tCONSTRAINT pk_ontology PRIMARY KEY ( ontology_id )\n+ );\n+\n+CREATE TABLE qiita.picking_params ( \n+\tpicking_params_id    bigserial  NOT NULL,\n+\tsimilarity           float8  NOT NULL,\n+\tpicking_type         float8  NOT NULL,\n+\tCONSTRAINT pk_picking_params PRIMARY KEY ( picking_params_id )\n+ );\n+\n+CREATE TABLE qiita.preprocessed_sequence_454_params ( \n+\tpreprocessed_params_id bigserial  NOT NULL,\n+\ttrim_length          integer  NOT NULL,\n+\tCONSTRAINT pk_preprocessed_sequence_454_params PRIMARY KEY ( preprocessed_params_id )\n+ );\n+\n+COMMENT ON TABLE qiita.preprocessed_sequence_454_params IS 'Parameters used for processing sequence data.';\n+\n+CREATE TABLE qiita.preprocessed_sequence_illumina_params ( \n+\tpreprocessed_params_id bigserial  NOT NULL,\n+\ttrim_length          integer  NOT NULL,\n+\tmax_bad_run_length   integer DEFAULT 3 NOT NULL,\n+\tmin_per_read_length_fraction real DEFAULT 0.75 NOT NULL,\n+\tsequence_max_n       integer DEFAULT 0 NOT NULL,\n+\tCONSTRAINT pk_preprocessed_sequence_illumina_params PRIMARY KEY ( preprocessed_params_id )\n+ );\n+\n+COMMENT ON TABLE qiita.preprocessed_sequence_illumina_params IS 'Parameters used for processing illumina sequence data.';\n+\n+CREATE TABLE qiita.preprocessed_spectra_params ( \n+\tpreprocessed_params_id bigserial  NOT NULL,\n+\tcol                  varchar  ,\n+\tCONSTRAINT pk_preprocessed_spectra_params PRIMARY KEY ( preprocessed_params_id )\n+ );\n+\n+COMMENT ON TABLE qiita.preprocessed_spectra_params IS 'Parameters used for processing spectra data.';\n+\n+CREATE TABLE qiita.processed_params_uclust ( \n+\tprocessed_params_id  bigserial  NOT NULL,\n+\tcol                  bigserial  ,\n+\tCONSTRAINT pk_processed_params_uclust PRIMARY KEY ( processed_params_id )\n+ );\n+\n+COMMENT ON TABLE qiita.processed_params_uclust IS 'Parameters used for processing data using method x';\n+\n+CREATE TABLE qiita.raw_data ( \n+\traw_data_id          bigserial  NOT NULL,\n+\tfiletype_id          bigint  NOT NULL,\n+\tfilepath             varchar  NOT NULL,\n+\tsubmit_to_insdc      bool  NOT NULL,\n+\tCONSTRAINT pk_raw_data UNIQUE ( raw_data_id ) ,\n+\tCONSTRAINT fk_raw_data_filetype FOREIGN KEY ( filetype_id ) REFERENCES qiita.filetype( filetype_id )    \n+ );\n+\n+CREATE INDEX idx_raw_data ON qiita.raw_data ( filetype_id );\n+\n+COMMENT ON COLUMN qiita.raw_data.filepath IS 'filepath to raw data hdf5';\n+\n+CREATE TABLE qiita.raw_data_prep_columns ( \n+\traw_data_id          bigint  NOT NULL,\n+\tcolumn_name          varchar  NOT NULL,\n+\tcolumn_type          varchar  NOT NULL,\n+\tCONSTRAINT idx_raw_data_prep_columns PRIMARY KEY ( raw_data_id, column_name, column_type ),\n+\tCONSTRAINT fk_prep_columns_raw_data FOREIGN KEY ( raw_data_id ) REFERENCES qiita.raw_data( raw_data_id )    \n+ );\n+\n+CREATE INDEX idx_prep_columns ON qiita.raw_data_prep_columns ( raw_data_id );\n+\n+COMMENT ON TABLE qiita.raw_data_prep_columns IS 'Holds the columns available for a given raw data prep';\n+\n+CREATE TABLE qiita.relationship_type ( \n+\trelationship_type_id bigserial  NOT NULL,\n+\trelationship_type    varchar(128)  ,\n+\tCONSTRAINT pk_relationship_type PRIMARY KEY ( relationship_type_id )\n+ );\n+\n+CREATE TABLE qiita.required_prep_info ( \n+\traw_data_id          bigserial  NOT NULL,\n+\tcenter_name          varchar  NOT NULL,\n+\tcenter_project_name  varchar  NOT NULL,\n+\tebi_submission_accession varchar  ,\n+\tebi_study_accession  varchar  ,\n+\temp_status_id        integer  ,\n+\tinvestigation_type   varchar  NOT NULL,\n+\tCONSTRAINT fk_required_prep_info_raw_data FOREIGN KEY ( raw_data_id ) REFERENCES qiita.raw_data( raw_data_id )    \n+ );\n+\n+CREATE INDEX idx_required_prep_info ON qiita.required_prep_info ( raw_data_id );\n+\n+CREATE TABLE qiita.term ( \n+\tterm_id              bigserial  NOT NULL,\n+\tontology_id          bigint  NOT NULL,\n+\tterm_name            varchar(255)  NOT NULL,\n+\tidentifier           varchar(255)  ,\n+\tdefinition           text  ,\n+\tnamespace            varchar(255)  ,\n+\tis_obsolete          bool DEFAULT 'false' NOT NULL,\n+\tis_root_term         bool  NOT NULL,\n+\tis_leaf              bool  NOT NULL,\n+\tCONSTRAINT pk_term PRIMARY KEY ( term_id ),\n+\tCONSTRAINT fk_term_ontology FOREIGN KEY ( ontology_id ) REFERENCES qiita.ontology( ontology_id )    \n+ );\n+\n+CREATE INDEX idx_term ON qiita.term ( ontology_id );\n+\n+CREATE TABLE qiita.term_path ( \n+\tterm_path_id         bigserial  NOT NULL,\n+\tsubject_term_id      bigint  NOT NULL,\n+\tpredicate_term_id    bigint  NOT NULL,\n+\tobject_term_id       bigint  NOT NULL,\n+\tontology_id          bigint  NOT NULL,\n+\trelationship_type_id integer  NOT NULL,\n+\tdistance             integer  ,\n+\tCONSTRAINT pk_term_path PRIMARY KEY ( term_path_id ),\n+\tCONSTRAINT fk_term_path_ontology FOREIGN KEY ( ontology_id ) REFERENCES qiita.ontology( ontology_id )    ,\n+\tCONSTRAINT fk_term_path_relationship_type FOREIGN KEY ( relationship_type_id ) REFERENCES qiita.relationship_type( relationship_type_id )    \n+ );\n+\n+CREATE INDEX idx_term_path ON qiita.term_path ( ontology_id );\n+\n+CREATE INDEX idx_term_path_0 ON qiita.term_path ( relationship_type_id );\n+\n+CREATE TABLE qiita.term_relationship ( \n+\tterm_relationship_id bigserial  NOT NULL,\n+\tsubject_term_id      bigint  NOT NULL,\n+\tpredicate_term_id    bigint  NOT NULL,\n+\tobject_term_id       bigint  NOT NULL,\n+\tontology_id          bigint  NOT NULL,\n+\tCONSTRAINT pk_term_relationship PRIMARY KEY ( term_relationship_id ),\n+\tCONSTRAINT fk_term_relationship_subj_term FOREIGN KEY ( subject_term_id ) REFERENCES qiita.term( term_id )    ,\n+\tCONSTRAINT fk_term_relationship_pred_term FOREIGN KEY ( predicate_term_id ) REFERENCES qiita.term( term_id )    ,\n+\tCONSTRAINT fk_term_relationship_obj_term FOREIGN KEY ( object_term_id ) REFERENCES qiita.term( term_id )    ,\n+\tCONSTRAINT fk_term_relationship_ontology FOREIGN KEY ( ontology_id ) REFERENCES qiita.ontology( ontology_id )    \n+ );\n+\n+CREATE INDEX idx_term_relationship ON qiita.term_relationship ( subject_term_id );\n+\n+CREATE INDEX idx_term_relationship ON qiita.term_relationship ( predicate_term_id );\n+\n+CREATE INDEX idx_term_relationship ON qiita.term_relationship ( object_term_id );\n+\n+CREATE INDEX idx_term_relationship ON qiita.term_relationship ( ontology_id );\n+\n+CREATE TABLE qiita.term_synonym ( \n+\tsynonym_id           bigserial  NOT NULL,\n+\tterm_id              bigint  NOT NULL,\n+\tsynonym_value        varchar(100)  NOT NULL,\n+\tsynonym_type_id      bigint  NOT NULL,\n+\tCONSTRAINT pk_term_synonym PRIMARY KEY ( synonym_id ),\n+\tCONSTRAINT fk_term_synonym_term FOREIGN KEY ( term_id ) REFERENCES qiita.term( term_id )    ,\n+\tCONSTRAINT fk_term_synonym_type_term FOREIGN KEY ( synonym_id ) REFERENCES qiita.term( term_id )    \n+ );\n+\n+CREATE INDEX idx_term_synonym ON qiita.term_synonym ( term_id );\n+\n+CREATE TABLE qiita.user_level ( \n+\tid_user_level        smallint  NOT NULL,","path":"qiita_db/qiita-db.sql","position":237,"original_position":237,"commit_id":"2e1ba9e1dd5c98eae9b3df330f9c0468300f775c","original_commit_id":"2e1ba9e1dd5c98eae9b3df330f9c0468300f775c","user":{"login":"teravest","id":5845974,"avatar_url":"https://avatars.githubusercontent.com/u/5845974?","gravatar_id":"397e14e89501c0c2c5f4487fa11f0529","url":"https://api.github.com/users/teravest","html_url":"https://github.com/teravest","followers_url":"https://api.github.com/users/teravest/followers","following_url":"https://api.github.com/users/teravest/following{/other_user}","gists_url":"https://api.github.com/users/teravest/gists{/gist_id}","starred_url":"https://api.github.com/users/teravest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teravest/subscriptions","organizations_url":"https://api.github.com/users/teravest/orgs","repos_url":"https://api.github.com/users/teravest/repos","events_url":"https://api.github.com/users/teravest/events{/privacy}","received_events_url":"https://api.github.com/users/teravest/received_events","type":"User","site_admin":false},"body":"i think you are already changing all of these but this should be user_level_id","created_at":"2014-04-08T22:40:59Z","updated_at":"2014-04-08T22:40:59Z","html_url":"https://github.com/biocore/qiita/pull/32#discussion_r11415302","pull_request_url":"https://api.github.com/repos/biocore/qiita/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments/11415302"},"html":{"href":"https://github.com/biocore/qiita/pull/32#discussion_r11415302"},"pull_request":{"href":"https://api.github.com/repos/biocore/qiita/pulls/32"}}}}