pshentsoff/mysql-to-sqlite

创建并将MySQL转储转换为SQLite数据库文件

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

This package is auto-updated.

Last update: 2024-09-28 20:40:54 UTC


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