ALTER TABLE AlleleFreqBySsPop ADD CONSTRAINT pk_AlleleFreqBySsPop_b129  PRIMARY KEY  (subsnp_id,pop_id,allele_id);
ALTER TABLE Batch ADD CONSTRAINT pk_Batch  PRIMARY KEY  (batch_id);
ALTER TABLE BatchCita ADD CONSTRAINT pk_BatchCita  PRIMARY KEY  (batch_id,position);
ALTER TABLE BatchCommLine ADD CONSTRAINT pk_BatchCommLine  PRIMARY KEY  (batch_id,line_num);
ALTER TABLE BatchCultivar ADD CONSTRAINT pk_BatchCultivar  PRIMARY KEY  (batch_id,line_num);
ALTER TABLE BatchMeExLine ADD CONSTRAINT pk_BatchMeExLine  PRIMARY KEY  (batch_id,line_num);
ALTER TABLE BatchStrain ADD CONSTRAINT pk_BatchStrain  PRIMARY KEY  (batch_id,line_num);
ALTER TABLE BatchValCode ADD CONSTRAINT pk_BatchValCode  PRIMARY KEY  (batch_id);
ALTER TABLE ClinSigCode ALTER COLUMN create_time SET DEFAULT NOW();
ALTER TABLE ClinSigCode ALTER COLUMN last_updated_time SET DEFAULT NOW();
ALTER TABLE ClinSigCode ALTER COLUMN severity_level SET DEFAULT (0);
ALTER TABLE ClinSigCode ADD CONSTRAINT PK__ClinSigC__357D4CF85DD3445E  PRIMARY KEY  (code);
ALTER TABLE Contact ADD CONSTRAINT pk_Contact  PRIMARY KEY  (batch_id,handle);
ALTER TABLE GeneIdToName ADD CONSTRAINT pk_GeneIdToName  PRIMARY KEY  (gene_id);
ALTER TABLE GtyFreqBySsPop ADD CONSTRAINT pk_GtyFreqBySsPop_b129  PRIMARY KEY  (subsnp_id,pop_id,unigty_id);
ALTER TABLE IndGrpCode ADD CONSTRAINT pk_IndGrpCode  PRIMARY KEY  (code);
ALTER TABLE IndivBySource ADD CONSTRAINT pk_IndivBySource  PRIMARY KEY  (src_id,src_ind_id);
ALTER TABLE Individual ADD CONSTRAINT pk_Individual  PRIMARY KEY  (ind_id);
ALTER TABLE OmimVarLocusIdSNP ADD CONSTRAINT fk_OmimVarLocusIdSNP_snp_id FOREIGN KEY (snp_id) REFERENCES b135_SNP(snp_id);
ALTER TABLE Pedigree ADD CONSTRAINT p_ped_id  PRIMARY KEY  (ped_id);
ALTER TABLE PedigreeIndividual ADD CONSTRAINT pk_PedigreeIndividual  PRIMARY KEY  (ped_id,ind_id);
ALTER TABLE PopLine ADD CONSTRAINT pk_PopLine  PRIMARY KEY  (pop_id,line_num);
ALTER TABLE PopMandLine ADD CONSTRAINT pk_PopMandLine  PRIMARY KEY  (pop_id,line_num);
ALTER TABLE Population ADD CONSTRAINT pk_Population_pop_id  PRIMARY KEY  (pop_id);
ALTER TABLE SNPAlleleFreq ADD CONSTRAINT pk_SNPAlleleFreq  PRIMARY KEY  (snp_id,allele_id);
ALTER TABLE SNPAncestralAllele ALTER COLUMN batch_id SET DEFAULT (0);
ALTER TABLE SNPAncestralAllele ADD CONSTRAINT pk_SNPAncestralAllele  PRIMARY KEY  (snp_id,batch_id);
ALTER TABLE SNPGtyFreq ADD CONSTRAINT pk_SNPGtyFreq  PRIMARY KEY  (snp_id,unigty_id);
ALTER TABLE SNPHWProb ADD CONSTRAINT pk_SNPHWProb  PRIMARY KEY  (snp_id);
ALTER TABLE SNPHistory ADD CONSTRAINT pk_SNPHistory  PRIMARY KEY  (snp_id);
ALTER TABLE SNPSuspect ALTER COLUMN upd_time SET DEFAULT NOW();
ALTER TABLE SNPSuspect ADD CONSTRAINT PK__SNPSuspe__430A13A116D6B790  PRIMARY KEY  (snp_id);
ALTER TABLE SNPVal ADD CONSTRAINT pk_SNPVal  PRIMARY KEY  (batch_id,snp_id);
ALTER TABLE SNP_HGVS ADD CONSTRAINT fk_SNP_HGVS FOREIGN KEY (snp_id) REFERENCES b135_SNP(snp_id);
ALTER TABLE SNP_bitfield ADD CONSTRAINT pk_SNP_bitfield  PRIMARY KEY  (snp_id);
ALTER TABLE SubPop ALTER COLUMN last_updated_time SET DEFAULT NOW();
ALTER TABLE SubPop ADD CONSTRAINT fk_SubPop_batch_id FOREIGN KEY (batch_id) REFERENCES Batch(batch_id);
ALTER TABLE SubPop ADD CONSTRAINT fk_SubPop_pop FOREIGN KEY (pop_id) REFERENCES Population(pop_id);
ALTER TABLE SubPop ADD CONSTRAINT PK__SubPop_new__180E3640  PRIMARY KEY  (batch_id,subsnp_id,pop_id,type);
ALTER TABLE SubPopAllele ADD CONSTRAINT fk_SubPopAllele_bid_ss_pop_type FOREIGN KEY (batch_id,subsnp_id,pop_id,type) REFERENCES SubPop(batch_id,subsnp_id,pop_id,type);
ALTER TABLE SubPopGty ADD CONSTRAINT pk_SubPopGty  PRIMARY KEY  (subpop_id,gty_id);
ALTER TABLE SubSNP ADD CONSTRAINT pk_SubSNP  PRIMARY KEY  (subsnp_id);
ALTER TABLE SubSNPAcc_ins ADD CONSTRAINT pk_SubSNPAcc  PRIMARY KEY  (subsnp_id,acc_type_ind,acc_part);
ALTER TABLE SubSNPCommLine_ins ADD CONSTRAINT pk_SubSNPCommLine  PRIMARY KEY  (subsnp_id,line_num);
ALTER TABLE SubSNPHGVS ADD CONSTRAINT pk_SubSNPHGVS  PRIMARY KEY  (subsnp_id);
ALTER TABLE SubSNPLinkout ALTER COLUMN link_type SET DEFAULT 'NA';
ALTER TABLE SubSNPLinkout ADD CONSTRAINT pk_SubSNPLinkout  PRIMARY KEY  (subsnp_id,link_type);
ALTER TABLE SubSNPMdFailLn ADD CONSTRAINT pk_SubSNPMdFailLn  PRIMARY KEY  (subsnp_id,line_num);
ALTER TABLE SubSNPNoVariSeq ADD CONSTRAINT pk_SubSNPNoVariSeq  PRIMARY KEY  (subsnp_id,line_num);
ALTER TABLE SubSNPOmim ADD CONSTRAINT pk_SubSNPOmim  PRIMARY KEY  (subsnp_id);
ALTER TABLE SubSNPPubmed ADD CONSTRAINT pk_SubSNPPubmed  PRIMARY KEY  (subsnp_id,line_num);
ALTER TABLE SubSNPSeq3_ins ADD CONSTRAINT pk_SubSNPSeq3  PRIMARY KEY  (subsnp_id,type,line_num);
ALTER TABLE SubSNPSeq5_ins ADD CONSTRAINT pk_SubSNPSeq5  PRIMARY KEY  (subsnp_id,type,line_num);
ALTER TABLE SubSNPSeqPos ADD CONSTRAINT pk_SubSNPSeqPos  PRIMARY KEY  (subsnp_id);
ALTER TABLE SubSNP_top_or_bot ADD CONSTRAINT PK__t_ss_top_or_bot__0D5DFFA8  PRIMARY KEY  (subsnp_id);
ALTER TABLE SubmittedIndividual ALTER COLUMN ploidy SET DEFAULT 2;
ALTER TABLE SubmittedIndividual ADD CONSTRAINT pk_SubmittedIndividual  PRIMARY KEY  (pop_id,loc_ind_id_upp);
ALTER TABLE SuspectReasonCode ALTER COLUMN create_time SET DEFAULT NOW();
ALTER TABLE SuspectReasonCode ALTER COLUMN last_update_time SET DEFAULT NOW();
ALTER TABLE SuspectReasonCode ADD CONSTRAINT PK__SuspectR__357D4CF8111DDE3A  PRIMARY KEY  (code);
ALTER TABLE Synonym ADD CONSTRAINT pk_Synonym  PRIMARY KEY  (subsnp_id,type);
ALTER TABLE b137_ContigInfo ALTER COLUMN last_updated_time SET DEFAULT NOW();
ALTER TABLE b137_ContigInfo ADD CONSTRAINT pk_b137_ContigInfo  PRIMARY KEY  (contig_gi);
ALTER TABLE b137_MapLink ADD CONSTRAINT fk_b137_MapLink_rs FOREIGN KEY (snp_id) REFERENCES SNP(snp_id);
ALTER TABLE b137_SNPChrPosOnRef ADD CONSTRAINT fk_b137_SNPChrPosOnRef_rs FOREIGN KEY (snp_id) REFERENCES SNP(snp_id);
ALTER TABLE b137_SNPContigLoc ADD CONSTRAINT fk_b137_SNPContigLoc_rs FOREIGN KEY (snp_id) REFERENCES SNP(snp_id);
ALTER TABLE b137_SNPContigLoc ADD CONSTRAINT pk_b137_SNPContigLoc  PRIMARY KEY  (snp_type,snp_id,ctg_id,asn_from);
ALTER TABLE b137_SNPMapInfo ADD CONSTRAINT fk_b137_SNPMapInfo_rs FOREIGN KEY (snp_id) REFERENCES SNP(snp_id);
ALTER TABLE dn_IND_batchCount ADD CONSTRAINT pk_dn_IND_batchCount  PRIMARY KEY  (batch_id,pop_id);
ALTER TABLE dn_PopulationIndGrp ADD CONSTRAINT pk_dn_PopulationIndGrp  PRIMARY KEY  (pop_id);
ALTER TABLE dn_batchCount ADD CONSTRAINT pk_dn_batchCount  PRIMARY KEY  (batch_id);
ALTER TABLE dn_handleCount ADD CONSTRAINT pk_dn_handleCount  PRIMARY KEY  (handle,batch_type);
