-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
Description
Having an issue with sqlite and migrations, I create the entity, get the mapper, run the migrate(),
no posts table in my db. Here is the code. The db is there and it has correct perms and traditional PDO things work. Also I am not getting any fails or message in error log. So maybe you see something, maybe it works in MySql but not in SQLITE?. At any rate this is a very promising project to help with our projects here.
$cfg = new \Spot\Config();
// Sqlite
$cfg->addConnection('sqlite', 'sqlite://db/database.sqlite' );
$spot = new \Spot\Locator($cfg);
$mapper = $spot->mapper('Entity\Post');
$mapper->migrate();
And the entity
['type' => 'integer', 'primary' => true, 'autoincrement' => true], 'title' => ['type' => 'string', 'required' => true], 'body' => ['type' => 'text', 'required' => true], 'status' => ['type' => 'integer', 'default' => 0, 'index' => true], 'author_id' => ['type' => 'integer', 'required' => true], 'date_created' => ['type' => 'datetime', 'value' => new \DateTime()] ]; } ``` }