forked from jsnbuchanan/crowd-funder-for-time-pwa
fix linting
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import migrationService from '../services/migrationService';
|
||||
import type { QueryExecResult } from '../services/migrationService';
|
||||
import migrationService from "../services/migrationService";
|
||||
import type { QueryExecResult } from "../services/migrationService";
|
||||
|
||||
// Each migration can include multiple SQL statements (with semicolons)
|
||||
const MIGRATIONS = [
|
||||
{
|
||||
name: '001_initial',
|
||||
name: "001_initial",
|
||||
// see ../db/tables files for explanations of the fields
|
||||
sql: `
|
||||
CREATE TABLE IF NOT EXISTS accounts (
|
||||
@@ -84,8 +84,8 @@ const MIGRATIONS = [
|
||||
id TEXT PRIMARY KEY,
|
||||
blobB64 TEXT
|
||||
);
|
||||
`
|
||||
}
|
||||
`,
|
||||
},
|
||||
];
|
||||
|
||||
export async function registerMigrations(): Promise<void> {
|
||||
@@ -96,8 +96,8 @@ export async function registerMigrations(): Promise<void> {
|
||||
}
|
||||
|
||||
export async function runMigrations(
|
||||
sqlExec: (sql: string, params?: any[]) => Promise<Array<QueryExecResult>>
|
||||
sqlExec: (sql: string, params?: any[]) => Promise<Array<QueryExecResult>>,
|
||||
): Promise<void> {
|
||||
await registerMigrations();
|
||||
await migrationService.runMigrations(sqlExec);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user