mirror of https://github.com/TriliumNext/Notes
fix(migration): JavaScript-based migrations not working
parent
01ff3d396d
commit
a80c3e32f1
@ -1,9 +1,9 @@
|
||||
module.exports = () => {
|
||||
const beccaLoader = require("../../src/becca/becca_loader");
|
||||
const becca = require("../../src/becca/becca");
|
||||
const cls = require("../../src/services/cls");
|
||||
const log = require("../../src/services/log");
|
||||
const sql = require("../../src/services/sql");
|
||||
export default async () => {
|
||||
const beccaLoader = (await import("../../src/becca/becca_loader")).default;
|
||||
const becca = (await import("../../src/becca/becca")).default;
|
||||
const cls = (await import("../../src/services/cls")).default;
|
||||
const log = (await import("../../src/services/log")).default;
|
||||
const sql = (await import("../../src/services/sql")).default;
|
||||
|
||||
cls.init(() => {
|
||||
// emergency disabling of image compression since it appears to make problems in migration to 0.61
|
||||
@ -0,0 +1,17 @@
|
||||
import { describe, it } from "vitest";
|
||||
import becca from "../becca/becca.js";
|
||||
import sql from "./sql.js";
|
||||
import migration from "./migration.js";
|
||||
import cls from "./cls.js";
|
||||
|
||||
describe("Migration", () => {
|
||||
it("migrates from v214", async () => {
|
||||
return new Promise<void>((resolve) => {
|
||||
cls.init(async () => {
|
||||
sql.rebuildIntegrationTestDatabase("test/db/document_v214.db");
|
||||
await migration.migrateIfNecessary();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Binary file not shown.
Loading…
Reference in New Issue