I have some seeds and I simply want to see the SQL they generate. With migrations I would simply do --pretend
but this isn't an option for db:seed
.
I also realize that I can see all the SQL statements that I run by using DB::getQueryLog()
etc. However, I don't want to actually execute the SQL.
Any ideas on how to generate the SQL your seed files would produce without actually running the sql?
Sample insert from one of my seeders:
DB::table('aca_reporting_1094_fields')->insert([
[
'field_name' => 'business_name',
'value' => 'Sesame St R Us',
'record_status' => 1,
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
],
]);
I realize I am probably missing something simple here and thanks for the helpful comments. I will look into extending the seed command and see if I do it successfully I will leave the answer (unless someone beats me to it).