thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.8k stars 2.67k forks source link

How to copy tables and its data from database to Git for others to use? #3202

Closed lohiloki closed 6 years ago

lohiloki commented 6 years ago

Description:

I am creating testing project where me and my co-worker have to work together. I created product tables and added data into my local database. Now, how I can copy tables and its data to my co-workers local database where as soon as he git pulls it, it should load to his system with all my table and its data in voyager dashboard.

I am new to Laravel and Laravel Voyager, help me out in this..

Steps To Reproduce:

MrCrayon commented 6 years ago

You need to create migrations for table structure https://laravel.com/docs/5.6/migrations and seeders for data https://laravel.com/docs/5.6/seeding. You can have a look at the source code of this project under migrations and publishable.

fletch3555 commented 6 years ago

@MrCrayon is correct. Voyager does not (currently) provide a method for exporting these, so you will have to do it yourself (either manually or through another package)

lohiloki commented 6 years ago

I am using now migration generator plugin and voyager bread generator hooks for this process. Its really tedious job and its not user friendly. I feel this is the major drawback for voyager framework.

Thanks for the reply @MrCrayon and @fletch3555.

moazam1 commented 6 years ago

@lohiloki what migration plugin are you using?

lohiloki commented 6 years ago

migration generator plugin -> https://github.com/Xethron/migrations-generator

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.