UNPKG

1.6 kBTypeScriptView Raw
1import { BaseCommand } from '@adonisjs/core/build/standalone';
2export default class DbWipe extends BaseCommand {
3 static commandName: string;
4 static description: string;
5 static settings: {
6 loadApp: boolean;
7 };
8 /**
9 * Choose a custom pre-defined connection. Otherwise, we use the
10 * default connection
11 */
12 connection: string;
13 /**
14 * Drop all views in database
15 */
16 dropViews: boolean;
17 /**
18 * Drop all types in database
19 */
20 dropTypes: boolean;
21 /**
22 * Force command execution in production
23 */
24 force: boolean;
25 /**
26 * Not a valid connection
27 */
28 private printNotAValidConnection;
29 /**
30 * Prompts to take consent when wiping the database in production
31 */
32 private takeProductionConstent;
33 /**
34 * Drop all views (if asked for and supported)
35 */
36 private performDropViews;
37 /**
38 * Drop all tables
39 */
40 private performDropTables;
41 /**
42 * Drop all types (if asked for and supported)
43 */
44 private performDropTypes;
45 /**
46 * Run as a subcommand. Never close database connections or exit
47 * process inside this method
48 */
49 private runAsSubCommand;
50 /**
51 * Branching out, so that if required we can implement
52 * "runAsMain" separately from "runAsSubCommand".
53 *
54 * For now, they both are the same
55 */
56 private runAsMain;
57 /**
58 * Handle command
59 */
60 run(): Promise<void>;
61 /**
62 * Lifecycle method invoked by ace after the "run"
63 * method.
64 */
65 completed(): Promise<void>;
66}