File: v15-dem-identity-dynamic.sql

package info (click to toggle)
gnumed-server 19.12-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 43,908 kB
  • ctags: 3,690
  • sloc: sql: 1,200,732; python: 12,836; sh: 1,145; makefile: 19
file content (23 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- ==============================================================
-- GNUmed database schema change script
--
-- License: GPL v2 or later
-- Author: karsten.hilbert@gmx.net
-- 
-- ==============================================================
\set ON_ERROR_STOP 1

-- --------------------------------------------------------------
-- .fk_primary_provider
comment on column dem.identity.fk_primary_provider is
'The doctor within this praxis primarily responsible for this patient.';


alter table dem.identity
	add foreign key (fk_primary_provider)
		references dem.staff(pk)
		on update cascade
		on delete restrict;

-- --------------------------------------------------------------
select gm.log_script_insertion('v15-dem-identity-dynamic.sql', 'Revision: 1.1');