drawDB/src/data/db.js
2024-04-05 03:08:00 +03:00

14 lines
318 B
JavaScript

import Dexie from "dexie";
import { templateSeeds } from "./seeds";
export const db = new Dexie("drawDB");
db.version(5).stores({
diagrams: "++id, lastModified",
templates: "++id, custom",
});
db.on("populate", (transaction) => {
transaction.templates.bulkAdd(templateSeeds).catch((e) => console.log(e));
});