import { Knex } from 'knex'; import { DBType } from '../StorageReader'; import { Chain } from '../../sdk/types'; interface Migration { up: (knex: Knex) => Promise; down?: (knex: Knex) => Promise; config?: object; } interface MigrationSource { getMigrations: (loadExtensions: readonly string[]) => Promise; getMigrationName: (migration: TMigrationSpec) => string; getMigration: (migration: TMigrationSpec) => Promise; } export declare class KnexMigrations implements MigrationSource { chain: Chain; storageName: string; storageIdentityKey: string; maxOutputScriptLength: number; migrations: Record; /** * @param chain * @param storageName human readable name for this storage instance * @param maxOutputScriptLength limit for scripts kept in outputs table, longer scripts will be pulled from rawTx */ constructor(chain: Chain, storageName: string, storageIdentityKey: string, maxOutputScriptLength: number); getMigrations(): Promise; getMigrationName(migration: string): string; getMigration(migration: string): Promise; getLatestMigration(): Promise; static latestMigration(): Promise; setupMigrations(chain: string, storageName: string, storageIdentityKey: string, maxOutputScriptLength: number): Record; } /** * @param knex * @returns {DBType} connected database engine variant */ export declare function determineDBType(knex: Knex): Promise; export {}; //# sourceMappingURL=KnexMigrations.d.ts.map