Skip to content

Commit

Permalink
Change to big increments
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxudo committed Sep 30, 2024
1 parent eaee07e commit 3efe2f8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
25 changes: 25 additions & 0 deletions migrations/2024_09_30_000000_profile_bigint_id.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Capsule\Manager as Capsule;

class ProfileBigintId extends Migration
{
private $tableName = 'profile';

public function up()
{
$capsule = new Capsule();
$capsule::schema()->table($this->tableName, function (Blueprint $table) {
$table->bigIncrements('id')->change();
});
}

public function down()
{
$capsule = new Capsule();
$capsule::schema()->table($this->tableName, function (Blueprint $table) {
$table->increments('id')->change();
});
}
}
4 changes: 3 additions & 1 deletion profile_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ public function get_data($serial_number = '')

$sql = "SELECT profile_name, profile_uuid, user, profile_method, payload_name, profile_id, payload_display, serial_number, profile_removal_allowed, profile_install_date, profile_organization, profile_verification_state, profile_description
FROM profile
WHERE serial_number = '$serial_number';";
LEFT JOIN reportdata USING (serial_number)
".get_machine_group_filter()."
AND serial_number = '$serial_number';";

$queryobj = new Profile_model;
jsonView($queryobj->query($sql));
Expand Down

0 comments on commit 3efe2f8

Please sign in to comment.