File: v15-clin-incoming_data_unmatched-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 (28 lines) | stat: -rw-r--r-- 896 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
24
25
26
27
28
-- ==============================================================
-- GNUmed database schema change script
--
-- License: GPL v2 or later
-- Author: karsten.hilbert@gmx.net
-- 
-- ==============================================================
\set ON_ERROR_STOP 1

-- --------------------------------------------------------------
comment on column clin.incoming_data_unmatched.comment is
'a free text comment on this row, eg. why is it here';



\unset ON_ERROR_STOP
alter table clin.incoming_data_unmatched drop constraint unmatched_data_sane_comment cascade;
\set ON_ERROR_STOP 1


alter table clin.incoming_data_unmatched
	add constraint unmatched_data_sane_comment check (
		gm.is_null_or_non_empty_string(comment) is true
	);


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