tod/mysql-to-sqlite

v1.2.1 2017-04-12 05:20 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:35:42 UTC


README

这是一个 Laravel 的封装器,用于esperlu的mysql2sqlite.sh,可以将mysqldump转换为Sqlite 3兼容文件。

Latest Stable Version Total Downloads Build Status

用法

您可以运行默认配置

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);
}

安装

您可能只是用于开发,因此我们将使用 require-dev

composer require --dev realpagelouisville/mysql-to-sqlite:~1.*