Lohith
Lohith

Reputation: 121

Create migration file while creating table in Laravel Voyager

I am using Voyager framework for Laravel. Wherenever I create table from Database Manager its creating table but its not creating any migration file. And its not good user interface who works on git repository(share the application's database schema). Everyone in the group has to create table in backend and have to work. This is not good.

but It creates table in database(phpmyadmin) and we have option to create Model(while creating table)

Any solution? need quick response

Upvotes: 6

Views: 4341

Answers (1)

Miller Adulu
Miller Adulu

Reputation: 83

Unfortunately, Laravel Voyager doesn't make migrations for user tables.

There are two workarounds.

  1. Laravel Migrations Generator

Use this dev package to generate the migrations for the given tables. Availabe on GitHub at: https://github.com/Xethron/migrations-generator. View the documentation to see how to generate the migrations for the specific tables.

However, the collaborators will have to create the BREADs for them.

  1. Copying the database

While sharing the database, the laravel voyager config tables that have all the changes and specs will be available on all the collaborator accounts.

Laravel voyager saves all its configurations in tables. Hence removing the need to generate migrations. Porting the whole DB works for most of my projects since I work on most apps alone.

Upvotes: 3

Related Questions