fix: adds optimize indexes (33) to migration runner (#330)
* fix: adds optimize indexes (33) to migration runner * chore: add changeset for migration 033 runner registration fix * test: update migration count assertions for 033_optimize_content_indexes
This commit is contained in:
@@ -70,7 +70,7 @@ describe("Database Migrations", () => {
|
||||
await expect(runMigrations(db)).resolves.not.toThrow();
|
||||
|
||||
const status = await getMigrationStatus(db);
|
||||
expect(status.applied).toHaveLength(31); // 001_initial through 032_rate_limits (no 010)
|
||||
expect(status.applied).toHaveLength(32); // 001_initial through 033_optimize_content_indexes (no 010)
|
||||
});
|
||||
|
||||
it("should record migration in tracking table", async () => {
|
||||
@@ -78,7 +78,7 @@ describe("Database Migrations", () => {
|
||||
|
||||
const records = await db.selectFrom("_emdash_migrations").selectAll().execute();
|
||||
|
||||
expect(records).toHaveLength(31);
|
||||
expect(records).toHaveLength(32);
|
||||
expect(records[0].name).toBe("001_initial");
|
||||
expect(records[0].timestamp).toBeDefined();
|
||||
expect(records[1].name).toBe("002_media_status");
|
||||
|
||||
@@ -75,7 +75,7 @@ describeEachDialect("Migrations", (dialect) => {
|
||||
|
||||
const migrations = await ctx.db.selectFrom("_emdash_migrations").selectAll().execute();
|
||||
|
||||
expect(migrations).toHaveLength(31);
|
||||
expect(migrations).toHaveLength(32);
|
||||
expect(migrations[0]?.name).toBe("001_initial");
|
||||
});
|
||||
|
||||
@@ -85,7 +85,7 @@ describeEachDialect("Migrations", (dialect) => {
|
||||
|
||||
const migrations = await ctx.db.selectFrom("_emdash_migrations").selectAll().execute();
|
||||
|
||||
expect(migrations).toHaveLength(31);
|
||||
expect(migrations).toHaveLength(32);
|
||||
});
|
||||
|
||||
it("reports correct migration status", async () => {
|
||||
|
||||
@@ -57,7 +57,7 @@ describe("Database Migrations (Integration)", () => {
|
||||
|
||||
const migrations = await db.selectFrom("_emdash_migrations").selectAll().execute();
|
||||
|
||||
expect(migrations).toHaveLength(31);
|
||||
expect(migrations).toHaveLength(32);
|
||||
expect(migrations[0]?.name).toBe("001_initial");
|
||||
expect(migrations[0]?.timestamp).toBeDefined();
|
||||
expect(migrations[1]?.name).toBe("002_media_status");
|
||||
@@ -98,8 +98,8 @@ describe("Database Migrations (Integration)", () => {
|
||||
|
||||
const migrations = await db.selectFrom("_emdash_migrations").selectAll().execute();
|
||||
|
||||
// Should still only have thirty-one migration records
|
||||
expect(migrations).toHaveLength(31);
|
||||
// Should still only have thirty-two migration records
|
||||
expect(migrations).toHaveLength(32);
|
||||
});
|
||||
|
||||
it("should report correct migration status", async () => {
|
||||
|
||||
Reference in New Issue
Block a user