Consolidation of database modules (db and migration)

Hey all,

This was discussed at yesterday’s technical committee meeting, but I propose that we consolidate the two database-related modules in the OpenLMIS 2.0 codebase. The original reason why the second module (migration) was created is no longer applicable and I think it would make things cleaner if we only had one database-related module for now.

Related to this is for us to consolidate all of the existing migration scripts into one by exporting the resulting schema from the build and putting it into a single script.

In terms of the impact to existing deployments, we will need to see the migration level of each deployment and put out a schema patch to update it to the correct level in 2.0.

Please give any feedback to this proposal if you have any.

Shalom,

Chongsun

– ​

There are 10 kinds of people in this world; those who understand binary, and those who don’t.

Chongsun Ahn | chongsun.ahn@villagereach.org

Software Development Engineer

Village****Reach* ** Starting at the Last Mile*

2900 Eastlake Ave. E, Suite 230, Seattle, WA 98102, USA

DIRECT: 1.206.512.1536 **CELL: **1.206.910.0973 FAX: 1.206.860.6972

SKYPE: chongsun.ahn.vr

www.villagereach.org

Connect on Facebook****, Twitter** ** and our Blog

Hey all,

As a follow-up to this, attached are two proposed migration scripts, one for schema, and one for basic data, that essentially recreate all of the migration scripts found in the db and migration modules. The existing migration scripts would be replaced with these two (the seed scripts would be left untouched) in the consolidation. The seed scripts would be left untouched. The basic data script is necessary to get the build to work properly, since some tests depend on certain data already existing in the database.

Please give any feedback if you have any.

20151230224556263__base_schema_2.0.sql (744 KB)

ATT00001.htm (215 Bytes)

20160104195828927__base_data_2.0.sql (743 KB)

ATT00002.htm (15.3 KB)