Fix constraints and indexes failures on db creation (bug 1095956)
Merge pull request #359 from davidbgk/1095956-fix-contraints-failure-on-db-creation

Fix constraints and indexes failures on db creation (bug 1095956)