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

#----------------------------------
[revision control]
file = $Source: /home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/server/bootstrap/update_db-v5_v6.conf,v $
version = $Revision: 1.11 $

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

keep temp files = no

description = $description$
This will update an existing GNUmed version 5
database to the version 6 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$
v5-v6-static
v5-v6-dynamic
$bundles$

#----------------------------------
[bundle v5-v6-static]
database alias = gnumed_v6
minimum postgresql version = 8.1
schema base directory = ../sql/v5-v6/static/
schema = $schema$
cfg-cfg_item.sql
cfg-cfg_str_array.sql
cfg-report_query.sql
ref-papersizes.sql
$schema$

#----------------------------------
[bundle v5-v6-dynamic]
database alias = gnumed_v6
minimum postgresql version = 8.1
schema base directory = ../sql/v5-v6/dynamic/
schema = $schema$
gm-schema.sql
cfg-cfg_template.sql
cfg-report_query.sql
dem-identity.sql
dem-lnk_job2person.sql
blobs-doc_obj.sql
blobs-v_latest_mugshot.sql
ref-papersizes.sql
$schema$

#----------------------------------
[database gnumed_v6]
name = gnumed_v6
override name by = GM_CORE_DB
drop target database = 1
target version = v6
transfer users = 1
template database = gnumed_v5
template version = v5
server alias = local host
audit disable = 1
audit trail parent table = audit.audit_trail
audit trail table prefix = log_
audit fields table = audit.audit_fields
schema base directory = ../sql/v5-v6/
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
$upgrade plausibility checks$

#----------------------------------
[server local host]
name = 
port = 5432
template database = template1
super user alias = postgres
schema base directory = ../sql/v5-v6/
schema = $schema$
$schema$

#----------------------------------
[user GNUmed owner]
name = gm-dbo
password = 

[user postgres]
name = postgres
#password =

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

database owner alias = GNUmed owner

groups = $groups$
$groups$

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