Skip to content

Commit

Permalink
Remove highlightHoveredCellId property from configuration of existing…
Browse files Browse the repository at this point in the history
… tasktypes (#5707)

* Remove highlightHoveredCellId property from configuration of existing task types

* changelog, migration guide
  • Loading branch information
fm3 authored Sep 6, 2021
1 parent 1ec60f8 commit 211de1f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- By default, if data is missing in one magnification, higher magnifications are used for rendering. This setting can be controlled via the left sidebar under "Render Missing Data Black". [#5703](https://github.com/scalableminds/webknossos/pull/5703)

### Fixed
-
- Fixed a bug where existing tasktypes with recommended configurations still had a property that is no longer valid. [#5707](https://github.com/scalableminds/webknossos/pull/5707)

### Removed
-
Expand Down
1 change: 1 addition & 0 deletions MIGRATIONS.released.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SET recommendedconfiguration = jsonb_set(
to_jsonb('true'::boolean))
```
- The health check at api/health does not longer include checking data/health and tracings/health if the respective local modules are enabled. Consider monitoring those routes separately.
- Run as sql: `UPDATE webknossos.tasktypes SET recommendedconfiguration = recommendedconfiguration - 'highlightHoveredCellId';` to avoid invalid recommended configurations in existing task types. This was added later as evolution 75, but should be run already here (note that it is idempotent).

### Postgres Evolutions:
- [072-jobs-manually-repaired.sql](conf/evolutions/072-jobs-manually-repaired.sql)
Expand Down
2 changes: 2 additions & 0 deletions MIGRATIONS.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ User-facing changes are documented in the [changelog](CHANGELOG.released.md).
## Unreleased

### Postgres Evolutions:

- [075-tasktype-remove-hovered-cell-id.sql](conf/evolutions/075-tasktype-remove-hovered-cell-id.sql)
7 changes: 7 additions & 0 deletions conf/evolutions/075-tasktype-remove-hovered-cell-id.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
START TRANSACTION;

UPDATE webknossos.tasktypes SET recommendedconfiguration = recommendedconfiguration - 'highlightHoveredCellId';

UPDATE webknossos.releaseInformation SET schemaVersion = 75;

COMMIT TRANSACTION;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
START TRANSACTION;

# Since we are losing information when removing the property, we cannot set it in the reversion.
# However, this will not create an invalid state since the object is merged with the user config.

UPDATE webknossos.releaseInformation SET schemaVersion = 74;

COMMIT TRANSACTION;
2 changes: 1 addition & 1 deletion tools/postgres/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ START TRANSACTION;
CREATE TABLE webknossos.releaseInformation (
schemaVersion BIGINT NOT NULL
);
INSERT INTO webknossos.releaseInformation(schemaVersion) values(74);
INSERT INTO webknossos.releaseInformation(schemaVersion) values(75);
COMMIT TRANSACTION;


Expand Down

0 comments on commit 211de1f

Please sign in to comment.