/* voucher_label */
create table voucher_label (
	accession_number     char(10)           not null,
	taxon_type           tinyint            not null,
	family               varchar(25)        not null,
	max_depth            int                not null,
	aff_depth            int                not null,
	genus                varchar(25)        null,
	species              varchar(25)        null,
	sp_author            varchar(100)       null,
	tri_rank             varchar(10)        null,
	tri_name             varchar(25)        null,
	tri_author           varchar(100)       null,
	quad_rank            varchar(10)        null,
	quad_name            varchar(25)        null,
	quad_author          varchar(100)       null,
	max_depth2           int                not null,
	genus2               varchar(25)        null,
	species2             varchar(25)        null,
	sp_author2           varchar(100)       null,
	tri_rank2            varchar(10)        null,
	tri_name2            varchar(25)        null,
	tri_author2          varchar(100)       null,
	quad_rank2           varchar(10)        null,
	quad_name2           varchar(25)        null,
	quad_author2         varchar(100)       null,
	location             varchar(255)       null,
	location2            varchar(255)       null,
	collector            varchar(150)       null,
	voucher              varchar(100)       null,
	acc_bed              varchar(45)        null,
	annotation           varchar(100)       null,
	hybrid_depth         int                null,
	voucher_id           varchar(16)        not null,
	approx_lines         int                null
)
go

sp_primarykey voucher_label, voucher_id
go

sp_bindefault zero_default, 'voucher_label.max_depth'
go

sp_bindefault zero_default, 'voucher_label.max_depth2'
go

sp_bindefault zero_default, 'voucher_label.aff_depth'
go

sp_bindrule taxon_type_rule, 'voucher_label.taxon_type'
go

