2020-09-19 21:38:26 +00:00
|
|
|
import Dexie from 'dexie';
|
|
|
|
|
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',
|
|
|
|
entries: '++id, day, type'
|
2020-09-19 21:38:26 +00:00
|
|
|
});
|
|
|
|
|
2020-09-19 23:59:24 +00:00
|
|
|
// db.open().catch(function (err) {
|
|
|
|
// console.error('Failed to open db: ' + (err.stack || err));
|
|
|
|
// });
|
|
|
|
|
2020-09-19 21:38:26 +00:00
|
|
|
export default db;
|