UNPKG

@adonisjs/lucid

Version:

SQL ORM built on top of Active Record pattern

72 lines (71 loc) 1.57 kB
import { BaseCommand } from '@adonisjs/core/ace'; import { type CommandOptions } from '@adonisjs/core/types/ace'; /** * This command reset the database by rolling back to batch 0 and then * re-run all migrations. */ export default class Refresh extends BaseCommand { static commandName: string; static description: string; static options: CommandOptions; /** * Custom connection for running migrations. */ connection: string; /** * Force command execution in production */ force: boolean; /** * Run seeders */ seed: boolean; /** * Drop all views in database */ dropViews: boolean; /** * Drop all types in database */ dropTypes: boolean; /** * Drop all domains in database */ dropDomains: boolean; /** * Disable advisory locks */ disableLocks: boolean; /** * Custom schema dump path to load before running pending migrations. */ schemaPath: string; /** * Converting command properties to shared arguments */ private getSharedArgs; /** * Converting command properties to db:wipe arguments */ private getWipeArgs; /** * Converting command properties to migration:run arguments */ private getMigrateArgs; /** * Wipe the database */ private runDbWipe; /** * Run migrations */ private runMigrations; /** * Run seeders */ private runDbSeed; /** * Handle command */ run(): Promise<void>; }