Skip to content

Commit

Permalink
Merge pull request #1254 from hovancik/fix/migration
Browse files Browse the repository at this point in the history
Fix migration scripts for new installs
  • Loading branch information
hovancik authored Dec 23, 2022
2 parents e634462 + 213fe4c commit 441576c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
## Fixed
- migration script for new installs


## [1.13.0] - 2022-12-23
### Added
- Galician translations
Expand Down
18 changes: 12 additions & 6 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,18 @@ function initialize (isAppStart = true) {
},
migrations: {
'1.13.0': store => {
store.set('pauseBreaksToggleShortcut', store.get('pauseBreaksShortcut'))
log.info(`Stretchly: settings pauseBreaksToggleShortcut to "${store.get('pauseBreaksShortcut')}"`)
store.delete('pauseBreaksShortcut')
log.info('Stretchly: removing pauseBreaksShortcut')
store.delete('resumeBreaksShortcut')
log.info('Stretchly: removing resumeBreaksShortcut')
if (store.get('pauseBreaksShortcut')) {
store.set('pauseBreaksToggleShortcut', store.get('pauseBreaksShortcut'))
log.info(`Stretchly: settings pauseBreaksToggleShortcut to "${store.get('pauseBreaksShortcut')}"`)
store.delete('pauseBreaksShortcut')
log.info('Stretchly: removing pauseBreaksShortcut')
} else {
log.info('Stretchly: not migrating pauseBreaksShortcut')
}
if (store.get('pauseBreaksShortcut')) {
store.delete('resumeBreaksShortcut')
log.info('Stretchly: removing resumeBreaksShortcut')
}
}
},
watch: true
Expand Down

0 comments on commit 441576c

Please sign in to comment.