The scripts to create a new i2b2 database as well as upgrade an existing database are found in i2b2-data repository. This repository also contains the scripts to insert the i2b2 demo data into the i2b2demo domain. The demo data is intended to provide an example of how you may want to setup your ontology, dimension and facts tables.
The i2b2 database scripts are maintained by the i2b2 team.
If an issue is found with the i2b2 database scripts please submit an issue in the i2b2 Bug Tracker under the i2b2 Core Software project.
Suggestions for improvements or enhancements to the i2b2 database scripts can also be submitted into the i2b2 Bug Tracker.