Skip to content

Commit

Permalink
Separate migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Aug 25, 2019
1 parent 4cb03b8 commit 9a9ed43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/store/migrate/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { listStore } from '../list.js'

import { MIGRATIONS } from './migrations.js'

// Saved benchmarked have a major version. This allows the
// saved benchmark format to introduce breaking changes without users losing
// their previous benchmarks. A `migrate` command performs the migration.
Expand Down Expand Up @@ -54,9 +56,6 @@ const reduceBenchmark = function(rawBenchmark, migration) {
return migration(rawBenchmark)
}

// Each entry is a migration function from one data version to the next one
const MIGRATIONS = []

const replaceStore = async function(rawBenchmarks, { store }) {
try {
await store.replace(rawBenchmarks)
Expand Down
2 changes: 2 additions & 0 deletions src/store/migrate/migrations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Each entry is a migration function from one data version to the next one
export const MIGRATIONS = []

0 comments on commit 9a9ed43

Please sign in to comment.