File: contactprop.sql

package info (click to toggle)
libchado-perl 1.31-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 44,716 kB
  • sloc: sql: 282,721; xml: 192,553; perl: 25,524; sh: 102; python: 73; makefile: 57
file content (20 lines) | stat: -rw-r--r-- 754 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- ================================================
-- TABLE: contactprop
-- ================================================

-- contactprop models person/lab properties, such as email, phone, etc.
-- the cvterms come from FOAF project, see the spec at http://xmlns.com/foaf/spec/

create table contactprop (
	contactprop_id bigserial not null,
	primary key (contactprop_id),
	contact_id bigint not null,
	foreign key (contact_id) references contact (contact_id) on delete cascade,
	type_id bigint not null,
	foreign key (type_id) references cvterm (cvterm_id) on delete cascade,
	value text,

	unique (contact_id, type_id, value)
);
create index contactprop_idx1 on contactprop (contactprop_id);
create index contactprop_idx2 on contactprop (type_id);