<commit_before><?php

$factory->define(App\Models\Group::class, function (Faker\Generator $faker) {
    return [
        'group_id' => function () use ($faker) {
            // try to avoid accidentally granting permissions based on hardcoded group ids
            return $faker->numberBetween(40, 100);
        },
        'group_name' => function () use ($faker) {
            return $faker->colorName().' '.$faker->domainWord();
        },
        'group_desc' => function () use ($faker) {
            return $faker->sentence();
        },
    ];
});
<commit_msg>Fix group factory to prevent causing primary key conflicts<commit_after><?php

use App\Models\Group;

$factory->define(App\Models\Group::class, function (Faker\Generator $faker) {
    return [
        // try to avoid accidentally granting permissions based on hardcoded group ids
        'group_id' => max(Group::max('group_id'), 40) + 1,
        'group_name' => function () use ($faker) {
            return $faker->colorName().' '.$faker->domainWord();
        },
        'group_desc' => function () use ($faker) {
            return $faker->sentence();
        },
    ];
});

{'fraction_non_alphanumeric': 0.15821678321678323, 'fraction_numerical': 0.006993006993006993, 'mean_word_length': 2.5122699386503067, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5377261', 'n_tokens_mistral': 340, 'n_tokens_neox': 327, 'n_words': 81}