Peter Serwylo 1c8cba5692 Properly add indexes when migrating database.
Moved index adding to a helper function, so that the same mistake isn't made
again. That is, indexes should be the same whether upgrading or creating a
database. Thus, the code to add indexes should always be the same regardless
of the reason for an index being added. The `IF NOT EXISTS` syntax helps
to allow the same queries to add during creatin and migration of database.
2016-07-18 22:20:36 +10:00
..
2016-07-06 20:22:02 +01:00