Hello, I need to execute some inserts/deletions/updates on entities in the database during migrations. I tried to use the connection field of the migration, like below:
public function up(Schema $schema)
'login' => 'admin',
'name' => 'Admin',
'password' => crypt('admin'),
'status' => 1,
But when executing migrations, it prints the error message "No SQL commands found", unless I add this line:
So, how am I supposed to perform INSERTS/DELETIONS/UPDATES on data during migration of the database?
Thanks for your help.
you should add the SQL to the list of queries being executed instead of executing them directly IMO, by using $this->addSQL()