# GNUmed database system bootstrapping config file
#-------------------------------------------------
# license: GPL v2 or later
# author: Karsten Hilbert@gmx.net

#----------------------------------
[installation]
interactive = yes

keep temp files = no

description = $description$
This will update an existing GNUmed version 7
database to the version 8 schema. It does not do
any harm to the data contained within.

The existing database is cloned first. The copy is
then modified. The original database remains unchanged.
$description$

bundles = $bundles$
v7-v8-static
v7-v8-dynamic
$bundles$

#----------------------------------
[bundle v7-v8-static]
database alias = gnumed_v8
minimum postgresql version = 8.1
schema base directory = ../sql/v7-v8/static/
schema = $schema$
gm-notifying_tables.sql
v8-dem_lnk_identity2comm.sql
v8-dem_lnk_job2person.sql
$schema$

#----------------------------------
[bundle v7-v8-dynamic]
database alias = gnumed_v8
minimum postgresql version = 8.1
schema base directory = ../sql/v7-v8/dynamic/
schema = $schema$
v8-gm-schema_revision_handling.sql
gm-notify_functions.sql
cfg-report_query.sql
v8-dem-enum_ext_id_types.sql
v8-dem-v_person_names.sql
v8-dem-v_person_comms.sql
clin-allergy_state.sql
clin-adjust_soap_cat.sql
blobs-doc_obj.sql
blobs-delete_document.sql
add_notification_signals.sql
$schema$

#----------------------------------
[database gnumed_v8]
name = gnumed_v8
drop target database = 1
target version = v8
transfer users = 1
source database = gnumed_v7
source version = v7
audit disable = 0
schema base directory = ../sql/v7-v8/
schema = $schema$
$schema$

superuser schema = $superuser schema$
$superuser schema$

upgrade plausibility checks = $upgrade plausibility checks$
identities::::select count(1) from dem.identity
select count(1) from dem.identity
names::::select count(1) from dem.names
select count(1) from dem.names
addresses::::select count(1) from dem.address
select count(1) from dem.address
episodes::::select count(1) from clin.episode
select count(1) from clin.episode
encounters::::select count(1) from clin.encounter
select count(1) from clin.encounter
issues::::select count(1) from clin.health_issue
select count(1) from clin.health_issue
documents::::select count(1) from blobs.doc_med
select count(1) from blobs.doc_med
pages::::select count(1) from blobs.doc_obj
select count(1) from blobs.doc_obj
allergies::::select count(1) from clin.allergy
select count(1) from clin.allergy
clinical items::::select count(1) from clin.clin_root_item
select count(1) from clin.clin_root_item
communication channels::::select count(1) from dem.lnk_identity2comm
select count(1) from dem.lnk_identity2comm
$upgrade plausibility checks$

script base directory = ../sql/v7-v8/python/
data import scripts = $data import scripts$
$data import scripts$

#----------------------------------
[cluster]
host name = 
port = 5432
maintenance database = template1
schema base directory = ../sql/v7-v8/
schema = $schema$
$schema$

#----------------------------------
# these really shouldn't be changed
#----------------------------------
[GnuMed defaults]

groups = $groups$
$groups$

#----------------------------------
