@h3ravel/database 11.1.0 → 11.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,67 @@
1
+ import { ConsoleCommand, ServiceProvider } from "@h3ravel/core";
1
2
  import { Knex } from "knex";
2
3
  import { Model as Model$1 } from "@h3ravel/arquebus";
3
- import { ServiceProvider } from "@h3ravel/core";
4
4
 
5
+ //#region src/Commands/MigrateCommand.d.ts
6
+ declare class MigrateCommand extends ConsoleCommand {
7
+ /**
8
+ * The current database connection
9
+ */
10
+ private connection;
11
+ /**
12
+ * The base path for all database operations
13
+ */
14
+ private databasePath;
15
+ /**
16
+ * The name and signature of the console command.
17
+ *
18
+ * @var string
19
+ */
20
+ protected signature: string;
21
+ /**
22
+ * The console command description.
23
+ *
24
+ * @var string
25
+ */
26
+ protected description: string;
27
+ /**
28
+ * Execute the console command.
29
+ */
30
+ handle(): Promise<void>;
31
+ /**
32
+ * Run all pending migrations.
33
+ */
34
+ protected migrateRun(): Promise<void>;
35
+ /**
36
+ * Drop all tables and re-run all migrations.
37
+ */
38
+ protected migrateFresh(): Promise<void>;
39
+ /**
40
+ * Create the migration repository.
41
+ */
42
+ protected migrateInstall(): Promise<void>;
43
+ /**
44
+ * Reset and re-run all migrations.
45
+ */
46
+ protected migrateRefresh(): Promise<void>;
47
+ /**
48
+ * Rollback all database migrations.
49
+ */
50
+ protected migrateReset(): Promise<void>;
51
+ /**
52
+ * Rollback the last database migration.
53
+ */
54
+ protected migrateRollback(): Promise<void>;
55
+ /**
56
+ * Show the status of each migration.
57
+ */
58
+ protected migrateStatus(): Promise<void>;
59
+ /**
60
+ * Publish any migration files from installed packages.
61
+ */
62
+ protected migratePublish(): Promise<void>;
63
+ }
64
+ //#endregion
5
65
  //#region src/Configuration.d.ts
6
66
  type TFunction = (...args: any[]) => any;
7
67
  interface TField {
@@ -87,5 +147,5 @@ declare class DatabaseServiceProvider extends ServiceProvider {
87
147
  register(): void;
88
148
  }
89
149
  //#endregion
90
- export { DatabaseServiceProvider, Model, TBaseConfig, TConfig, TField, arquebusConfig };
150
+ export { DatabaseServiceProvider, MigrateCommand, Model, TBaseConfig, TConfig, TField, arquebusConfig };
91
151
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,7 +1,67 @@
1
+ import { ConsoleCommand, ServiceProvider } from "@h3ravel/core";
1
2
  import { Model as Model$1 } from "@h3ravel/arquebus";
2
- import { ServiceProvider } from "@h3ravel/core";
3
3
  import { Knex } from "knex";
4
4
 
5
+ //#region src/Commands/MigrateCommand.d.ts
6
+ declare class MigrateCommand extends ConsoleCommand {
7
+ /**
8
+ * The current database connection
9
+ */
10
+ private connection;
11
+ /**
12
+ * The base path for all database operations
13
+ */
14
+ private databasePath;
15
+ /**
16
+ * The name and signature of the console command.
17
+ *
18
+ * @var string
19
+ */
20
+ protected signature: string;
21
+ /**
22
+ * The console command description.
23
+ *
24
+ * @var string
25
+ */
26
+ protected description: string;
27
+ /**
28
+ * Execute the console command.
29
+ */
30
+ handle(): Promise<void>;
31
+ /**
32
+ * Run all pending migrations.
33
+ */
34
+ protected migrateRun(): Promise<void>;
35
+ /**
36
+ * Drop all tables and re-run all migrations.
37
+ */
38
+ protected migrateFresh(): Promise<void>;
39
+ /**
40
+ * Create the migration repository.
41
+ */
42
+ protected migrateInstall(): Promise<void>;
43
+ /**
44
+ * Reset and re-run all migrations.
45
+ */
46
+ protected migrateRefresh(): Promise<void>;
47
+ /**
48
+ * Rollback all database migrations.
49
+ */
50
+ protected migrateReset(): Promise<void>;
51
+ /**
52
+ * Rollback the last database migration.
53
+ */
54
+ protected migrateRollback(): Promise<void>;
55
+ /**
56
+ * Show the status of each migration.
57
+ */
58
+ protected migrateStatus(): Promise<void>;
59
+ /**
60
+ * Publish any migration files from installed packages.
61
+ */
62
+ protected migratePublish(): Promise<void>;
63
+ }
64
+ //#endregion
5
65
  //#region src/Configuration.d.ts
6
66
  type TFunction = (...args: any[]) => any;
7
67
  interface TField {
@@ -87,5 +147,5 @@ declare class DatabaseServiceProvider extends ServiceProvider {
87
147
  register(): void;
88
148
  }
89
149
  //#endregion
90
- export { DatabaseServiceProvider, Model, TBaseConfig, TConfig, TField, arquebusConfig };
150
+ export { DatabaseServiceProvider, MigrateCommand, Model, TBaseConfig, TConfig, TField, arquebusConfig };
91
151
  //# sourceMappingURL=index.d.ts.map