tapestry-cloud / database-plugin
Database plugin for Tapestry
Requires
- php: >=5.6.0
- doctrine/dbal: ^2.5
- doctrine/orm: ^2.5
Requires (Dev)
- phpunit/phpunit: 5.7.*
- tapestry-cloud/tapestry: ^1
This package is auto-updated.
Last update: 2024-11-07 16:06:38 UTC
README
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.
Install
To install run composer require tapestry-cloud/database-plugin
Setup
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.
Development
To run migrations use:
vendor\bin\doctrine.bat orm:schema-tool:update --force