@@ -14,25 +14,25 @@ class AddIndexesForTasks extends Migration
14
14
public function up ()
15
15
{
16
16
Schema::table (config ('totem.table_prefix ' ).'task_results ' , function (Blueprint $ table ) {
17
- $ table ->index ('task_id ' , 'task_id_idx ' );
18
- $ table ->index ('ran_at ' , 'ran_at_idx ' );
17
+ $ table ->index ('task_id ' , 'task_results_task_id_idx ' );
18
+ $ table ->index ('ran_at ' , 'task_results_ran_at_idx ' );
19
19
$ table ->foreign ('task_id ' , 'task_id_fk ' )
20
20
->references ('id ' )->on ('tasks ' );
21
21
});
22
22
23
23
Schema::table (config ('totem.table_prefix ' ).'task_frequencies ' , function (Blueprint $ table ) {
24
- $ table ->index ('task_id ' , 'task_id_idx ' );
25
- $ table ->foreign ('task_id ' , 'task_id_fk ' )
24
+ $ table ->index ('task_id ' , 'task_frequencies_task_id_idx ' );
25
+ $ table ->foreign ('task_id ' , 'task_frequencies_task_id_fk ' )
26
26
->references ('id ' )->on ('tasks ' );
27
27
});
28
28
29
29
Schema::table (config ('totem.table_prefix ' ).'tasks ' , function (Blueprint $ table ) {
30
- $ table ->index ('is_active ' , 'is_active_idx ' );
31
- $ table ->index ('dont_overlap ' , 'dont_overlap_idx ' );
32
- $ table ->index ('run_in_maintenance ' , 'run_in_maintenance_idx ' );
33
- $ table ->index ('run_on_one_server ' , 'run_on_one_server_idx ' );
34
- $ table ->index ('auto_cleanup_num ' , 'auto_cleanup_num_idx ' );
35
- $ table ->index ('auto_cleanup_type ' , 'auto_cleanup_type_idx ' );
30
+ $ table ->index ('is_active ' , 'tasks_is_active_idx ' );
31
+ $ table ->index ('dont_overlap ' , 'tasks_dont_overlap_idx ' );
32
+ $ table ->index ('run_in_maintenance ' , 'tasks_run_in_maintenance_idx ' );
33
+ $ table ->index ('run_on_one_server ' , 'tasks_run_on_one_server_idx ' );
34
+ $ table ->index ('auto_cleanup_num ' , 'tasks_auto_cleanup_num_idx ' );
35
+ $ table ->index ('auto_cleanup_type ' , 'tasks_auto_cleanup_type_idx ' );
36
36
});
37
37
}
38
38
@@ -44,23 +44,23 @@ public function up()
44
44
public function down ()
45
45
{
46
46
Schema::table (config ('totem.table_prefix ' ).'task_results ' , function (Blueprint $ table ) {
47
- $ table ->dropIndex ('task_id_idx ' );
48
- $ table ->dropIndex ('ran_at_idx ' );
49
- $ table ->dropForeign ('task_id_fk ' );
47
+ $ table ->dropIndex ('task_results_task_id_idx ' );
48
+ $ table ->dropIndex ('task_results_ran_at_idx ' );
49
+ $ table ->dropForeign ('task_results_task_id_fk ' );
50
50
});
51
51
52
52
Schema::table (config ('totem.table_prefix ' ).'task_frequencies ' , function (Blueprint $ table ) {
53
- $ table ->dropIndex ('task_id_idx ' );
54
- $ table ->dropForeign ('task_id_fk ' );
53
+ $ table ->dropIndex ('task_frequencies_task_id_idx ' );
54
+ $ table ->dropForeign ('task_frequencies_task_id_fk ' );
55
55
});
56
56
57
57
Schema::table (config ('totem.table_prefix ' ).'tasks ' , function (Blueprint $ table ) {
58
- $ table ->dropIndex ('is_active_idx ' );
59
- $ table ->dropIndex ('dont_overlap_idx ' );
60
- $ table ->dropIndex ('run_in_maintenance_idx ' );
61
- $ table ->dropIndex ('run_on_one_server_idx ' );
62
- $ table ->dropIndex ('auto_cleanup_num_idx ' );
63
- $ table ->dropIndex ('auto_cleanup_type_idx ' );
58
+ $ table ->dropIndex ('tasks_is_active_idx ' );
59
+ $ table ->dropIndex ('tasks_dont_overlap_idx ' );
60
+ $ table ->dropIndex ('tasks_run_in_maintenance_idx ' );
61
+ $ table ->dropIndex ('tasks_run_on_one_server_idx ' );
62
+ $ table ->dropIndex ('tasks_auto_cleanup_num_idx ' );
63
+ $ table ->dropIndex ('tasks_auto_cleanup_type_idx ' );
64
64
});
65
65
}
66
66
}
0 commit comments