Download the PHP package cxuan1225/sql-laravel-schema-converter without Composer

On this page you can find all versions of the php package cxuan1225/sql-laravel-schema-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sql-laravel-schema-converter

SQL Laravel Schema Converter

Convert MySQL or MariaDB CREATE TABLE statements into Laravel migration code.

Use this when you have an existing SQL dump and want a faster starting point for Laravel migrations. The converter can run as an npm CLI, Laravel Artisan command, browser tool, or Vercel API. The npm and Composer package contents are kept separate so each installation gets only the files it needs.

Quick Start

Node CLI

Install the standalone CLI:

Convert a SQL dump into a Laravel migration file:

Print generated PHP to stdout instead:

Laravel Artisan

Install the Laravel package:

Convert a SQL dump from inside a Laravel application:

When the output path is a directory, the CLI and Artisan command create a Laravel-style migration filename automatically.

Example

Input SQL:

Command:

Output excerpt:

What It Converts

The converter also detects warnings, SQL size, table names, foreign keys, and conversion status while editing in the browser UI.

Safety Checks

By default, conversion is blocked when the input contains CRUD or data statements such as SELECT, INSERT, UPDATE, DELETE, or REPLACE. Use --ignore-crud when you want those statements skipped instead.

Foreign key constraints are moved into a second migration pass so referenced tables can be created first.

Installation From GitHub

If the packages have not been published to npm or Packagist yet, install directly from GitHub.

Composer uses composer require to download a package into a Laravel project. composer install is only for installing dependencies from an existing composer.lock.

Node CLI Reference

Run the converter directly from the repository:

Write to a migration directory:

Available CLI options:

Laravel Artisan Reference

The Composer package registers this command in Laravel applications:

Examples:

The Artisan command supports the same conversion options as the Node CLI.

Browser Usage

Open sql_to_laravel_schema_creator.html in a browser.

No build step is required. The page loads Tailwind CSS from the CDN and uses the local files in assets/.

The browser app supports importing .sql or .txt files, pasting from the clipboard, copying output, and downloading the generated migration.

API Usage

Deploy the repository on Vercel and send JSON to:

Example request:

Example response shape:

Package Contents

The repository keeps the browser app, Vercel API, Node CLI, and Laravel package together, but published package contents are separated:

Deployment

This repository is ready for static deployment on Vercel. The vercel.json file rewrites / to sql_to_laravel_schema_creator.html, so the browser converter is available at the site root after deployment.

Project Structure

Verification

Run JavaScript syntax checks:

Run the JavaScript converter/API/CLI tests:

Validate Composer metadata:

Run the PHP converter smoke test:

Conversion Notes

This is a practical converter, not a full SQL parser or database engine. Always review the generated migration before running it, especially for:

The converter is designed to accelerate migration drafting while keeping final schema review in the developer's hands.

AI-Generated Content Notice

This project was generated with assistance from AI tools. It may contain mistakes, incomplete behavior, security issues, or misleading documentation. Users are solely responsible for reviewing, testing, and validating all code before use, especially in production environments. The repository owner, contributors, and any referenced authors make no warranties and accept no liability for errors, omissions, or any consequences arising from the use of this project. This notice is supplementary to and does not modify the terms of the MIT License.

License

MIT


All versions of sql-laravel-schema-converter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cxuan1225/sql-laravel-schema-converter contains the following files

Loading the files please wait ...