-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor fixures as entities rather than sql #31
Copy link
Copy link
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels