2020-09-20 01:45:42 +00:00
|
|
|
import Dexie from '/vendor/js/dexie.js';
|
2020-09-19 21:38:26 +00:00
|
|
|
|
2020-09-19 23:59:24 +00:00
|
|
|
const db = new Dexie('fast');
|
2020-09-19 21:38:26 +00:00
|
|
|
|
|
|
|
db.version(1).stores({
|
2020-09-19 23:59:24 +00:00
|
|
|
catalog: '++id, value, type, target',
|
2020-10-04 21:51:20 +00:00
|
|
|
entries: '++id, day, type',
|
|
|
|
weight: 'date'
|
2020-09-19 21:38:26 +00:00
|
|
|
});
|
|
|
|
|
2020-09-20 01:45:42 +00:00
|
|
|
db.open().catch(function (err) {
|
|
|
|
console.error('Failed to open db: ' + (err.stack || err));
|
|
|
|
});
|
2020-09-19 23:59:24 +00:00
|
|
|
|
2020-09-19 21:38:26 +00:00
|
|
|
export default db;
|