1. Andrew Davison
  2. sumatra
  3. Issues


Issue #189 resolved

`smt upgrade` assumes the record store database is within the ".smt" directory

Andrew Davison
repo owner created an issue

If the SQLite database file is elsewhere, then either there will be django.db.utils.DatabaseError: no such column errors, or, in the absence of schema changes, there will be a risk of corruption, as multiple records with the same name could be created.

The solution for the SQLite backend is to delete the database file as well as deleting ".smt" (after making a backup copy, of course).

For the PostgreSQL backend, I guess we could either drop then recreate the tables, or use something like South to perform the schema migration.

Comments (1)

  1. Andrew Davison reporter

    Added a clear() method to the RecordStore interface, which not only deletes all data but also removes all structure (using DROP TABLE, etc.), to clear the way for an upgrade. In future, this would be better done via migrations (in Django 1.7 or using South). Fixes #189.

    → <<cset 7cf1d98226c7>>

  2. Log in to comment