declare module '@ioc:Adonis/Lucid/Schema' { import { Knex } from 'knex'; import { QueryClientContract, RawQueryBindings } from '@ioc:Adonis/Lucid/Database'; /** * Shape of callback to defer database calls */ export type DeferCallback = (client: QueryClientContract) => void | Promise; /** * Shape of schema class constructor */ export interface SchemaConstructorContract { disableTransactions: boolean; new (db: QueryClientContract, file: string, dryRun: boolean): SchemaContract; } /** * Shape of schema class */ export interface SchemaContract { readonly file: string; dryRun: boolean; debug: boolean; db: QueryClientContract; schema: Knex.SchemaBuilder; now(precision?: number): Knex.Raw; knex(): Knex.QueryBuilder; raw(sql: string, bindings?: RawQueryBindings): Knex.Raw; defer: (cb: DeferCallback) => void; up(): Promise | void; down(): Promise | void; execUp(): Promise; execDown(): Promise; } const Schema: SchemaConstructorContract; export default Schema; }