Skip to content

Commit 27732c6

Browse files
committed
update: seeder chunk size and some documentaion
Signed-off-by: robinNcode <[email protected]>
1 parent ced4d8a commit 27732c6

File tree

7 files changed

+31
-2
lines changed

7 files changed

+31
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "robinncode/laravel-db-craft",
33
"description": "Generate Laravel migrations and seeders from existing database connections",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"keywords": [
66
"laravel",
77
"migration",

config/db-craft.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
| Number of records to insert per chunk in seeders.
5757
|
5858
*/
59-
'seeder_chunk_size' => 100,
59+
'seeder_chunk_size' => 1000,
6060

6161
/*
6262
|--------------------------------------------------------------------------

src/Commands/GenerateMigrationCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
use Illuminate\Console\Command;
66
use RobinNcode\LaravelDbCraft\Services\MigrationGenerator;
77

8+
/**
9+
* Command to generate migration files from existing database tables.
10+
* Can generate for all tables or a specific table.
11+
* @author RobinNcode
12+
*/
813
class GenerateMigrationCommand extends Command
914
{
1015
/**

src/Commands/GenerateSeederCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
use Illuminate\Console\Command;
66
use RobinNcode\LaravelDbCraft\Services\SeederGenerator;
77

8+
/**
9+
* Command to generate seeder files from existing database tables with data.
10+
* Can generate for all tables or a specific table.
11+
* @author RobinNcode
12+
*/
813
class GenerateSeederCommand extends Command
914
{
1015
/**

src/DbCraftServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
use RobinNcode\LaravelDbCraft\Commands\GenerateMigrationCommand;
77
use RobinNcode\LaravelDbCraft\Commands\GenerateSeederCommand;
88

9+
/**
10+
* Service provider for the DbCraft package.
11+
* Registers configuration and console commands.
12+
* @author RobinNcode
13+
*/
914
class DbCraftServiceProvider extends ServiceProvider
1015
{
1116
/**

src/Services/MigrationGenerator.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
use Illuminate\Support\Facades\Schema;
77
use Illuminate\Support\Str;
88

9+
/**
10+
* Service to generate migrations from existing database tables.
11+
* Generates migration files for all tables or specific tables,
12+
* including columns, indexes, and foreign keys.
13+
*
14+
* @author RobinNcode
15+
*/
16+
917
class MigrationGenerator
1018
{
1119
protected $connection;

src/Services/SeederGenerator.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
use Illuminate\Support\Facades\DB;
66
use Illuminate\Support\Str;
77

8+
/**
9+
* Service to generate seeders from existing database tables.
10+
* Generates seeder files for all tables or specific tables,
11+
* including data insertion in chunks.
12+
* @author RobinNcode
13+
*/
814
class SeederGenerator
915
{
1016
protected $connection;

0 commit comments

Comments
 (0)