Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Migrations Generator Laravel Package

kitloong/laravel-migrations-generator

Generate Laravel migration files from an existing database schema, including columns, indexes, and foreign keys. Works with MariaDB/MySQL, PostgreSQL, SQL Server, and SQLite. Generate all tables or target/ignore specific tables via Artisan.

View on GitHub
Deep Wiki
Context7

Connection

-c, --connection[=CONNECTION]

The --connection option allows you to specify the database connection to use. If you don't specify a connection, the default connection as defined in your Laravel's config/database.php will be used.

This option is particularly useful when you have multiple database connections defined in your Laravel application and you want to generate migrations for a specific connection.

Example

Suppose you have a connection named secondary defined in your config/database.php. You can generate migrations for this connection by running:

php artisan migrate:generate --connection="secondary"

This command will generate migrations for the tables in the secondary database connection.

// Up
Schema::connection('secondary')->create('users', function (Blueprint $table) {
    $table->bigIncrements('id');
    ...
});

// Down
Schema::connection('secondary')->dropIfExists('users');

If you are not sure what is the name of the connection you want to use, you can check the connections array in your config/database.php file.

array_keys(config('database.connections'))
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui