Syncs project state with database
This is a work in progress, which once complete will allow you to export the Tapestry project state to a database for manipulation by third party tools. In the case of Tapestry this is a precursor to the API plugin for an in browser admin panel.
To install run composer require tapestry-cloud/database-plugin
Update your site configuration to include your database configuration:
// ...
'plugins' => [
'database' => [
'driver' => 'pdo_sqlite',
'path' => __DIR__ . DIRECTORY_SEPARATOR . 'db.sqlite'
]
]
// ...
Next within your site kernel.php you will need to register the plugins service provider within its boot method:
public function boot(){
// ...
$this->tapestry->register(\TapestryCloud\Database\ServiceProvider::class);
// ...
}
Upon you next running tapestry build your database will be updated with the current project state.
To run migrations use:
vendor\bin\doctrine.bat orm:schema-tool:update --force