ALTER TABLE [Allele] ADD 
	CONSTRAINT [pk_Allele] PRIMARY KEY  CLUSTERED 
	(
		[allele_id]
	)
GO


ALTER TABLE [AlleleFlagCode] ADD 
	CONSTRAINT [pk_AlleleFlagCode] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO


ALTER TABLE [AlleleMotif] ADD 
	CONSTRAINT [pk_AlleleMotif] PRIMARY KEY  CLUSTERED 
	(
		[allele_id],
		[motif_order]
	)
GO


ALTER TABLE [AllocIds] ADD 
	CONSTRAINT [pk_AllocIds] PRIMARY KEY  NONCLUSTERED 
	(
		[name]
	)
GO


ALTER TABLE [Author] ADD 
	CONSTRAINT [pk_Author] PRIMARY KEY  NONCLUSTERED 
	(
		[pub_id],
		[position]
	)
GO




ALTER TABLE [CpGCode] ADD 
	CONSTRAINT [pk_CpGCode] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO




ALTER TABLE [GenomeBuildInfo] ADD 
	CONSTRAINT [DF__GenomeBui__inser__15E52B55] DEFAULT (getdate()) FOR [insert_time],
	CONSTRAINT [DF__GenomeBui__is_ma__18C19800] DEFAULT (1) FOR [is_major],
	CONSTRAINT [DF__GenomeBui__ncbi___23FE4082] DEFAULT (0) FOR [ncbi_genome_tax_id]
GO


ALTER TABLE [GtyAllele] ADD 
	CONSTRAINT [pk_GtyAllele] PRIMARY KEY  CLUSTERED 
	(
		[gty_id],
		[rev_flag],
		[chr_num]
	)
GO


ALTER TABLE [IUPACna] ADD 
	CONSTRAINT [pk_IUPACna] PRIMARY KEY  CLUSTERED 
	(
		[allele]
	)
GO


ALTER TABLE [LoadHistory] ADD 
	CONSTRAINT [pk_LoadHistory] PRIMARY KEY  NONCLUSTERED 
	(
		[build_id]
	)
GO


ALTER TABLE [LocTypeCode] ADD 
	CONSTRAINT [DF__LocTypeCo__creat__75CD617E] DEFAULT (getdate()) FOR [create_time],
	CONSTRAINT [pk_LocTypeCode] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO


ALTER TABLE [MapLinkCode] ADD 
	CONSTRAINT [pk_MapLinkCode] PRIMARY KEY  CLUSTERED 
	(
		[which_code],
		[code]
	)
GO


ALTER TABLE [Method] ADD 
	CONSTRAINT [pk_Method_mid] PRIMARY KEY  CLUSTERED 
	(
		[method_id]
	)
GO


ALTER TABLE [MethodClass] ADD 
	CONSTRAINT [pk_MethodClass] PRIMARY KEY  CLUSTERED 
	(
		[meth_class_id]
	)
GO


ALTER TABLE [MethodLine] ADD 
	CONSTRAINT [pk_MethodLine] PRIMARY KEY  NONCLUSTERED 
	(
		[method_id],
		[line_num]
	)
GO


ALTER TABLE [Moltype] ADD 
	CONSTRAINT [pk_Moltype] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO


ALTER TABLE [Motif] ADD 
	CONSTRAINT [pk_Motif] PRIMARY KEY  CLUSTERED 
	(
		[motif_id]
	)
GO


ALTER TABLE [ObsGenotype] ADD 
	CONSTRAINT [pk_ObsGenotype] PRIMARY KEY  CLUSTERED 
	(
		[gty_id]
	)
GO


ALTER TABLE [ObsVariation] ADD 
	CONSTRAINT [DF__ObsVariat__creat__3BB5CE82] DEFAULT (getdate()) FOR [create_time],
	CONSTRAINT [DF__ObsVariat__last___3CA9F2BB] DEFAULT (getdate()) FOR [last_updated_time],
	CONSTRAINT [pk_ObsVariation] PRIMARY KEY  CLUSTERED 
	(
		[var_id]
	)
GO


ALTER TABLE [OrgDbStatus] ADD 
	CONSTRAINT [pk_org_db_status] PRIMARY KEY  CLUSTERED 
	(
		[database_name]
	)
GO


ALTER TABLE [OrganismTax] ADD 
	CONSTRAINT [pk_organism] PRIMARY KEY  NONCLUSTERED 
	(
		[tax_id]
	)
GO


ALTER TABLE [PopClass] ADD 
	CONSTRAINT [pk_PopClass] PRIMARY KEY  CLUSTERED 
	(
		[pop_id],
		[pop_class_id]
	)
GO


ALTER TABLE [PopClassCode] ADD 
	CONSTRAINT [PK__PopClassCode__270595B6] PRIMARY KEY  CLUSTERED 
	(
		[pop_class_id]
	)
GO


ALTER TABLE [Publication] ADD 
	CONSTRAINT [pk_Publication] PRIMARY KEY  NONCLUSTERED 
	(
		[pub_id]
	)
GO


ALTER TABLE [SNPGlossary] ADD 
	CONSTRAINT [DF__SNPGlossa__last___4050666D] DEFAULT (getdate()) FOR [last_updated],
	CONSTRAINT [pk_SNPGlossary] PRIMARY KEY  CLUSTERED 
	(
		[term]
	)
GO


ALTER TABLE [SNP_tax_id] ADD 
	CONSTRAINT [DF__SNP_tax_i__statu__31583BA0] DEFAULT ('C') FOR [status],
	CONSTRAINT [pk_SNP_tax_id] PRIMARY KEY  CLUSTERED 
	(
		[snp_id]
	)
GO


ALTER TABLE [SnpChrCode] ADD 
	CONSTRAINT [pk_SnpChrCode] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO


ALTER TABLE [SnpClassCode] ADD 
	CONSTRAINT [pk_SnpClassCode] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO


ALTER TABLE [SnpFunctionCode] ADD 
	CONSTRAINT [pk_SnpFunctionCode] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO


ALTER TABLE [SnpValidationCode] ADD 
	CONSTRAINT [pk_SnpValidationCode] PRIMARY KEY  NONCLUSTERED 
	(
		[code]
	)
GO


ALTER TABLE [StrandCode] ADD 
	CONSTRAINT [pk_StrandCode] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO




ALTER TABLE [Submitter] ADD 
	CONSTRAINT [DF_Submitter_create_time] DEFAULT (getdate()) FOR [create_time],
	CONSTRAINT [pk_Submitter] PRIMARY KEY  NONCLUSTERED 
	(
		[handle]
	)
GO


ALTER TABLE [TemplateType] ADD 
	CONSTRAINT [pk_TemplateType] PRIMARY KEY  CLUSTERED 
	(
		[temp_type_id]
	)
GO


ALTER TABLE [UniGty] ADD 
	CONSTRAINT [pk_UniGty] PRIMARY KEY  CLUSTERED 
	(
		[unigty_id]
	)
GO


ALTER TABLE [UniVariAllele] ADD 
	CONSTRAINT [pk_UniVariAllele] PRIMARY KEY  CLUSTERED 
	(
		[univar_id],
		[allele_id]
	)
GO


ALTER TABLE [UniVariation] ADD 
	CONSTRAINT [pk_UniVariation] PRIMARY KEY  CLUSTERED 
	(
		[univar_id]
	)
GO


ALTER TABLE [UniVariationSrcCode] ADD 
	CONSTRAINT [pk_UniVariationSrcCode] PRIMARY KEY  CLUSTERED 
	(
		[code]
	)
GO


ALTER TABLE [VariAllele] ADD 
	CONSTRAINT [pk_VariAllele] PRIMARY KEY  CLUSTERED 
	(
		[var_id],
		[allele_id]
	)
GO


ALTER TABLE [db_DataDictionaryNew] ADD 
	CONSTRAINT [DF__db_DataDi__updat__5BB889C0] DEFAULT (getdate()) FOR [update_time]
GO


ALTER TABLE [db_ftp_table_list] ADD 
	CONSTRAINT [DF__db_ftp_ta__creat__27F9B9EF] DEFAULT (getdate()) FOR [create_time],
	CONSTRAINT [pk_db_ftp_table_list] PRIMARY KEY  CLUSTERED 
	(
		[table_name]
	)
GO



ALTER TABLE [dn_Allele_rev] ADD 
	CONSTRAINT [pk_dn_Allele_rev] PRIMARY KEY  CLUSTERED 
	(
		[allele_id],
		[rev_flag]
	)
GO


ALTER TABLE [dn_Motif_rev] ADD 
	CONSTRAINT [pk_dn_Motif_rev] PRIMARY KEY  CLUSTERED 
	(
		[motif_id],
		[rev_flag]
	)
GO


ALTER TABLE [dn_UniGty_allele] ADD 
	CONSTRAINT [pk_dn_UniGty_allele] PRIMARY KEY  CLUSTERED 
	(
		[unigty_id],
		[chr_num]
	)
GO


ALTER TABLE [dn_UniGty_rev] ADD 
	CONSTRAINT [pk_dn_Gty_rev] PRIMARY KEY  CLUSTERED 
	(
		[unigty_id],
		[rev_flag]
	)
GO


ALTER TABLE [dn_UniVariation_rev] ADD 
	CONSTRAINT [pk_dn_UniVariation_rev] PRIMARY KEY  CLUSTERED 
	(
		[univar_id],
		[rev_flag]
	)
GO




ALTER TABLE [dn_summary] ADD 
	CONSTRAINT [DF__dn_summar__creat__383A4359] DEFAULT (getdate()) FOR [create_time],
	CONSTRAINT [DF__dn_summar__last___392E6792] DEFAULT (getdate()) FOR [last_updated_time],
	 PRIMARY KEY  CLUSTERED 
	(
		[tax_id],
		[build_id],
		[type]
	)
GO


