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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
-- ==============================================================
-- GNUmed database schema change script
--
-- Source database version: v2
-- Target database version: v3
--
-- What it does:
-- - change clin.test_org
--
-- License: GPL v2 or later
-- Author: Karsten Hilbert
--
-- ==============================================================
-- $Id: clin-test_org.sql,v 1.2 2006-10-28 12:22:48 ncq Exp $
-- $Revision: 1.2 $
-- --------------------------------------------------------------
\set ON_ERROR_STOP 1
-- --------------------------------------------------------------
\unset ON_ERROR_STOP
alter table clin.test_org
drop constraint "$1";
alter table clin.test_org
drop constraint "test_org_fk_adm_contact_fkey";
\set ON_ERROR_STOP 1
alter table clin.test_org
add foreign key(fk_adm_contact)
references dem.identity(pk)
on update cascade
on delete restrict;
\unset ON_ERROR_STOP
alter table clin.test_org
drop constraint "$2";
alter table clin.test_org
drop constraint "test_org_fk_med_contact_fkey";
\set ON_ERROR_STOP 1
alter table clin.test_org
add foreign key(fk_med_contact)
references dem.identity(pk)
on update cascade
on delete restrict;
-- --------------------------------------------------------------
select public.log_script_insertion('$RCSfile: clin-test_org.sql,v $', '$Revision: 1.2 $');
-- ==============================================================
-- $Log: clin-test_org.sql,v $
-- Revision 1.2 2006-10-28 12:22:48 ncq
-- - 8.1 prides itself in naming FKs differently -- better -- but makes
-- changing auto-named foreign keys a pain
--
-- Revision 1.1 2006/10/24 13:08:26 ncq
-- - mainly changes due to dropped clin.xlnk_identity
--
-- Revision 1.4 2006/09/28 14:39:51 ncq
-- - add comment template
--
-- Revision 1.3 2006/09/18 17:32:53 ncq
-- - make more fool-proof
--
-- Revision 1.2 2006/09/16 21:47:37 ncq
-- - improvements
--
-- Revision 1.1 2006/09/16 14:02:36 ncq
-- - use this as a template for change scripts
--
--
|