tapestry-cloud/database-plugin

0.5.3 2017-11-24 14:20 UTC

This package is auto-updated.

Last update: 2024-09-07 15:44:20 UTC


README

同步项目状态与数据库

Build Status Latest Stable Version License

这是一个正在进行中的工作,完成后将允许您将Tapestry项目状态导出到数据库中,以便第三方工具进行操作。对于Tapestry来说,这是浏览器内管理面板API插件的前置工作。

安装

要安装,请运行composer require tapestry-cloud/database-plugin

设置

更新您的网站配置,包括数据库配置

// ...
    'plugins' => [
        'database' => [
            'driver' => 'pdo_sqlite',
            'path' => __DIR__ . DIRECTORY_SEPARATOR . 'db.sqlite'
        ]
    ]
// ...

接下来,在您的网站kernel.php中,您需要在它的boot方法中注册插件服务提供者

public function boot(){
    // ...
    
    $this->tapestry->register(\TapestryCloud\Database\ServiceProvider::class);
    
    // ...
}

当您再次运行tapestry build时,您的数据库将更新为当前的项目状态。

开发

要运行迁移,请使用

vendor\bin\doctrine.bat orm:schema-tool:update --force