chore(format): auto-format files with biome
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { drizzle as drizzlePostgres } from "drizzle-orm/node-postgres";
|
||||
import type { PoolClient } from "pg";
|
||||
import { Pool } from "pg";
|
||||
import { config } from "../../shared/config/config.js";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import * as schema from "./schema.js";
|
||||
|
||||
const logger = createChildLogger("drizzle");
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import "dotenv/config";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import type { PoolClient } from "pg";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { drizzle as drizzlePostgres } from "drizzle-orm/node-postgres";
|
||||
import { migrate as migratePostgres } from "drizzle-orm/node-postgres/migrator";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import type { PoolClient } from "pg";
|
||||
import {
|
||||
closeDatabase,
|
||||
initializeDatabase,
|
||||
@@ -44,7 +44,9 @@ async function getFirstMigrationTag(): Promise<string> {
|
||||
const journal: MigrationJournal = JSON.parse(raw);
|
||||
|
||||
if (!journal.entries || journal.entries.length === 0) {
|
||||
throw new Error("Migration journal is empty — cannot determine first migration tag");
|
||||
throw new Error(
|
||||
"Migration journal is empty — cannot determine first migration tag",
|
||||
);
|
||||
}
|
||||
|
||||
// Entries are ordered by idx — the first entry is the initial migration.
|
||||
@@ -110,7 +112,10 @@ async function seedDrizzleHistory(client: PoolClient): Promise<void> {
|
||||
[firstMigrationTag, Date.now()],
|
||||
);
|
||||
}
|
||||
logger.info({ firstMigrationTag }, "Drizzle history seeded — first migration marked applied");
|
||||
logger.info(
|
||||
{ firstMigrationTag },
|
||||
"Drizzle history seeded — first migration marked applied",
|
||||
);
|
||||
}
|
||||
|
||||
export async function runMigrations(): Promise<void> {
|
||||
|
||||
@@ -497,4 +497,5 @@ export type StickerCacheRecord = typeof stickerCacheTable.$inferSelect;
|
||||
export type StickerCacheInsert = typeof stickerCacheTable.$inferInsert;
|
||||
|
||||
export type CorrectedModeration = typeof correctedModerationsTable.$inferSelect;
|
||||
export type CorrectedModerationInsert = typeof correctedModerationsTable.$inferInsert;
|
||||
export type CorrectedModerationInsert =
|
||||
typeof correctedModerationsTable.$inferInsert;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { desc, eq } from "drizzle-orm";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { desc, eq } from "drizzle-orm";
|
||||
import { getDatabase } from "./drizzle.js";
|
||||
import {
|
||||
type VoiceRecording,
|
||||
|
||||
Reference in New Issue
Block a user