Skip to content

v0.2.1

Choose a tag to compare

@sxergiu sxergiu released this 30 Oct 14:50
· 5 commits to main since this release
9c96978

Logtower 0.2.1

No one has lost data. This release fixes how Logtower changes its database, before the next change to the database is made. In 0.2.0, the first change of a certain kind would have deleted every log on every install. There is still only one database version, and installing 0.2.1 does not change your database.

0.2.1 is the first release offered through the updater built into 0.2.0. If you run 0.2.0, the title screen shows v0.2.1 available with an Update button. Installing it by hand works too.

A future database change could have deleted every log (#29)

Logtower changes its database through numbered migrations (#15). These ran with SQLite's foreign-key enforcement on. The usual way to change a column in SQLite is to rebuild the table: create a new one, copy the rows across, then drop the old one and rename the new one. With enforcement on, dropping tasks deleted every task first, and ON DELETE CASCADE carried that into logs. A test migration that rebuilt tasks finished without an error, recorded itself as applied, and left 0 logs. Rebuilding projects would have gone through tasks into logs the same way.

Now:

  • Migrations run with foreign-key enforcement off, and it is turned back on afterwards.
  • Each migration is checked before it is saved. A migration that leaves a log or task pointing at a row that doesn't exist is undone, and Logtower refuses to start instead of opening an inconsistent database.
  • Logtower refuses a database written by a newer version. Installing an older Logtower over a newer one used to run the old code against a database layout it had never seen. Startup now fails and reports the database version.

0.1.0 and 0.2.0 only ever applied the first migration, which creates the tables. That migration never drops anything, so no existing database was affected.

Known, and not fixed here

  • A failed start shows nothing on Windows. The reason is printed to a console that a release build does not have, so Logtower just doesn't open. This is true of every startup failure since 0.1.0, and now includes the two cases above.
  • The updater has not yet installed an update. 0.2.1 is the first update it can find, so this release is its first real use.
  • Not checked before release: this version was not launched by hand. The change is covered by tests that build and migrate databases, and it runs in CI on macOS, Linux and Windows.
  • Still true from 0.2.0:
    • Esc does not close quick log while one of its dropdowns has focus;
    • on GNOME without the AppIndicator extension, there is no tray icon;
    • the installers are not code-signed, so macOS and Windows warn on first run;
    • the hotkey does not work on Wayland.