1
1
<?php
2
2
3
- use Illuminate \Database \Migrations \Migration ;
4
- use Illuminate \Database \Schema \Blueprint ;
5
3
use Illuminate \Support \Facades \Schema ;
4
+ use Illuminate \Database \Schema \Blueprint ;
5
+ use Illuminate \Database \Migrations \Migration ;
6
6
7
7
class AlterTasksTableAddAutoCleanupNumAndTypeFields extends Migration
8
8
{
@@ -13,20 +13,20 @@ class AlterTasksTableAddAutoCleanupNumAndTypeFields extends Migration
13
13
*/
14
14
public function up ()
15
15
{
16
- Schema::table (config ('totem.table_prefix ' ) . 'task_results ' , function (Blueprint $ table ) {
16
+ Schema::table (config ('totem.table_prefix ' ). 'task_results ' , function (Blueprint $ table ) {
17
17
$ table ->index ('task_id ' , 'task_id_idx ' );
18
18
$ table ->index ('ran_at ' , 'ran_at_idx ' );
19
19
$ table ->foreign ('task_id ' , 'task_id_fk ' )
20
20
->references ('task_id ' )->on ('tasks ' );
21
21
});
22
22
23
- Schema::table (config ('totem.table_prefix ' ) . 'task_frequencies ' , function (Blueprint $ table ) {
23
+ Schema::table (config ('totem.table_prefix ' ). 'task_frequencies ' , function (Blueprint $ table ) {
24
24
$ table ->index ('task_id ' , 'task_id_idx ' );
25
25
$ table ->foreign ('task_id ' , 'task_id_fk ' )
26
26
->references ('task_id ' )->on ('tasks ' );
27
27
});
28
28
29
- Schema::table (config ('totem.table_prefix ' ) . 'tasks ' , function (Blueprint $ table ) {
29
+ Schema::table (config ('totem.table_prefix ' ). 'tasks ' , function (Blueprint $ table ) {
30
30
$ table ->index ('is_active ' , 'is_active_idx ' );
31
31
$ table ->index ('dont_overlap ' , 'dont_overlap_idx ' );
32
32
$ table ->index ('run_in_maintenance ' , 'run_in_maintenance_idx ' );
@@ -43,18 +43,18 @@ public function up()
43
43
*/
44
44
public function down ()
45
45
{
46
- Schema::table (config ('totem.table_prefix ' ) . 'task_results ' , function (Blueprint $ table ) {
46
+ Schema::table (config ('totem.table_prefix ' ). 'task_results ' , function (Blueprint $ table ) {
47
47
$ table ->dropIndex ('task_id_idx ' );
48
48
$ table ->dropIndex ('ran_at_idx ' );
49
49
$ table ->dropForeign ('task_id_fk ' );
50
50
});
51
51
52
- Schema::table (config ('totem.table_prefix ' ) . 'task_frequencies ' , function (Blueprint $ table ) {
52
+ Schema::table (config ('totem.table_prefix ' ). 'task_frequencies ' , function (Blueprint $ table ) {
53
53
$ table ->dropIndex ('task_id_idx ' );
54
54
$ table ->dropForeign ('task_id_fk ' );
55
55
});
56
56
57
- Schema::table (config ('totem.table_prefix ' ) . 'tasks ' , function (Blueprint $ table ) {
57
+ Schema::table (config ('totem.table_prefix ' ). 'tasks ' , function (Blueprint $ table ) {
58
58
$ table ->dropIndex ('is_active_idx ' );
59
59
$ table ->dropIndex ('dont_overlap_idx ' );
60
60
$ table ->dropIndex ('run_in_maintenance_idx ' );
0 commit comments