Skip to content

Commit ee1fdfb

Browse files
committed
Fix issues
1 parent 18cfbdf commit ee1fdfb

File tree

4 files changed

+80
-76
lines changed

4 files changed

+80
-76
lines changed

config/xhprof.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
return [
4-
'enabled' => env('XHPROF_ENABLED', false),
4+
'enabled' => env('XHPROF_ENABLED', false),
55

66
'skip' => [
77
'/__clockwork/',

database/migrations/2025_12_22_163233_create_xhprof_table.php

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,59 @@
22

33
use Illuminate\Database\Migrations\Migration;
44
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\DB;
56
use Illuminate\Support\Facades\Schema;
67

78
class CreateXHProfTable extends Migration
89
{
9-
/**
10-
* Run the migrations.
11-
*
12-
* @return void
13-
*/
14-
public function up()
15-
{
16-
Schema::create('details', function (Blueprint $table) {
17-
$table->id('idcount');
18-
$table->char('id', 64);
19-
$table->char('url', 255)->nullable();
20-
$table->char('c_url', 255)->nullable();
21-
$table->timestamp('timestamp')->useCurrent()->useCurrentOnUpdate();
22-
$table->char('server name', 64)->nullable();
23-
$table->binary('perfdata')->nullable();
24-
$table->tinyInteger('type')->nullable();
25-
$table->binary('cookie')->nullable();
26-
$table->binary('post')->nullable();
27-
$table->binary('get')->nullable();
28-
$table->integer('pmu')->nullable();
29-
$table->integer('wt')->nullable();
30-
$table->integer('cpu')->nullable();
31-
$table->char('server_id', 64)->nullable();
32-
$table->char('aggregateCalls_include', 255)->nullable();
10+
/**
11+
* Run the migrations.
12+
*
13+
* @return void
14+
*/
15+
public function up()
16+
{
17+
Schema::create('details', function (Blueprint $table) {
18+
$table->id('idcount');
19+
$table->char('id', 64);
20+
$table->char('url', 255)->nullable();
21+
$table->char('c_url', 255)->nullable();
22+
$table->timestamp('timestamp')->useCurrent()->useCurrentOnUpdate();
23+
$table->char('server name', 64)->nullable();
24+
$table->binary('perfdata')->nullable();
25+
$table->tinyInteger('type')->nullable();
26+
$table->binary('cookie')->nullable();
27+
$table->binary('post')->nullable();
28+
$table->binary('get')->nullable();
29+
$table->integer('pmu')->nullable();
30+
$table->integer('wt')->nullable();
31+
$table->integer('cpu')->nullable();
32+
$table->char('server_id', 64)->nullable();
33+
$table->char('aggregateCalls_include', 255)->nullable();
3334

34-
$table->index('url');
35-
$table->index('c_url');
36-
$table->index('cpu');
37-
$table->index('wt');
38-
$table->index('pmu');
39-
$table->index('timestamp');
40-
$table->index(['server name', 'timestamp']);
41-
});
42-
43-
if(DB::connection()->getDriverName() === 'mysql') {
44-
DB::statement('ALTER TABLE details MODIFY COLUMN `perfdata` LONGBLOB');
45-
DB::statement('ALTER TABLE details MODIFY COLUMN `cookie` LONGBLOB');
46-
DB::statement('ALTER TABLE details MODIFY COLUMN `post` LONGBLOB');
47-
}
48-
}
35+
$table->index('url');
36+
$table->index('c_url');
37+
$table->index('cpu');
38+
$table->index('wt');
39+
$table->index('pmu');
40+
$table->index('timestamp');
41+
$table->index(['server name', 'timestamp']);
42+
});
4943

50-
/**
51-
* Reverse the migrations.
52-
*
53-
* @return void
54-
*/
55-
public function down()
56-
{
57-
Schema::dropIfExists('details');
58-
}
59-
};
44+
if (DB::connection()->getDriverName() === 'mysql') {
45+
DB::statement('ALTER TABLE details MODIFY COLUMN `perfdata` LONGBLOB');
46+
DB::statement('ALTER TABLE details MODIFY COLUMN `cookie` LONGBLOB');
47+
DB::statement('ALTER TABLE details MODIFY COLUMN `post` LONGBLOB');
48+
}
49+
}
50+
51+
/**
52+
* Reverse the migrations.
53+
*
54+
* @return void
55+
*/
56+
public function down()
57+
{
58+
Schema::dropIfExists('details');
59+
}
60+
}

database/migrations/2025_12_22_163234_add_index_to_xhprof_table.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@
66

77
class AddIndexToXHProfTable extends Migration
88
{
9-
/**
10-
* Run the migrations.
11-
*
12-
* @return void
13-
*/
14-
public function up()
15-
{
16-
Schema::table('details', function (Blueprint $table) {
17-
$table->dropColumn('idcount');
18-
$table->char('id', 64)->primary()->change();
19-
});
20-
}
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::table('details', function (Blueprint $table) {
17+
$table->dropColumn('idcount');
18+
$table->char('id', 64)->primary()->change();
19+
});
20+
}
2121

22-
/**
23-
* Reverse the migrations.
24-
*
25-
* @return void
26-
*/
27-
public function down()
28-
{
29-
Schema::table('details', function (Blueprint $table) {
30-
$table->id('idcount');
31-
$table->char('id', 64)->change();
32-
});
33-
}
34-
};
22+
/**
23+
* Reverse the migrations.
24+
*
25+
* @return void
26+
*/
27+
public function down()
28+
{
29+
Schema::table('details', function (Blueprint $table) {
30+
$table->id('idcount');
31+
$table->char('id', 64)->change();
32+
});
33+
}
34+
}

rector.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
__DIR__ . '/app/Metadata/Laminas/Unicode.php',
3333

3434
// Ignore all the test directory for now...
35-
__DIR__ . '/tests/*'
35+
__DIR__ . '/tests/*',
36+
// Ignore all hprof related files
37+
__DIR__ . '/public/vendor/xhprof/*',
38+
3639
]);
3740
return $rectorConfig;

0 commit comments

Comments
 (0)