app:setup doesn't work with sqlite, I think because you can't send multiple sql statements to ->execute().
My quick hack fix:
if (true === isset($count['total']) && 0 == $count['total']) {
foreach (explode("\n", $file) as $sqlStatement) {
if ($sqlStatement) {
$connection->executeQuery($sqlStatement);
}
}
$output->writeln('<info>Feed data inserted</info>');
but really these shouldn't be sql statements, they should be simple Action entities.
$action = (new Action())->setTitle(..)->setReverse();
Even better would be to check if the action existed first, so that new actions could be added without resetting the database.
app:setup doesn't work with sqlite, I think because you can't send multiple sql statements to ->execute().
My quick hack fix:
but really these shouldn't be sql statements, they should be simple Action entities.
Even better would be to check if the action existed first, so that new actions could be added without resetting the database.