pshentsoff / mysql-to-sqlite
创建并将MySQL转储转换为SQLite数据库文件
v1.2.1
2017-04-12 05:20 UTC
Requires
- php: >=5.6.0
- illuminate/console: >=5.0
- illuminate/contracts: >=5.0
- illuminate/support: >=5.0
- symfony/process: >=2.7
Requires (Dev)
- phpspec/phpspec: ~2.3
- squizlabs/php_codesniffer: ~2.5
- symfony/var-dumper: dev-master
README
这是esperlu的mysql2sqlite.sh的Laravel包装器,它可以将mysqldump转换为与SQLite 3兼容的文件。[esperlu的mysql2sqlite.sh](https://gist.github.com/esperlu/943776)。
安装
您可能只会在开发中使用它,所以我们将使用require-dev
composer require --dev pshentsoff/mysql-to-sqlite
使用方法
您可以运行默认配置
php artisan db:mysql-to-sqlite
运行单个默认转换配置
php artisan db:mysql-to-sqlite customerServiceDBForCI
配置
- 发布配置...
Laravel使用方法
发布配置...
php artisan vendor:publish --provider="MysqlToSqlite\ServiceProvider"
将以下内容添加到app/Providers/AppServiceProvider.php
public function register() { // Class may not be there if it was loaded as a dev dependency if (class_exists('MysqlToSqlite\ServiceProvider')) { $this->app->register(\MysqlToSqlite\ServiceProvider::class); } }
Lumen使用方法
发布配置...
cp vendor/realpagelouisville/mysql-to-sqlite/config/mysql-to-sqlite.php config/mysql-to-sqlite.php
将以下内容添加到app/bootstrap/app.php
// Class may not be there if it was loaded as a dev dependency if(class_exists('MysqlToSqlite\ServiceProvider')) { $app->register(MysqlToSqlite\ServiceProvider::class); }