Can someone help me using admin Voyager using git? For example, If you need to add new content type, how to add git for future push and deploy it on the remote server?
Asked
Active
Viewed 1,606 times
0
-
1Your question is unclear and also seems to be unrelated to Voyager itself. Are you asking how you can commit the changes that Voyager makes to your database into version control? – maiorano84 Aug 22 '17 at 21:33
-
Yes, I need to work from my Local environment So, When I need push my change to server, How to push its changes? Ex. New breads. Git hasn't included Vendor folder and content in my database – Ezequiel Fernandez Aug 22 '17 at 22:45
1 Answers
1
Git - as well as SVN, Mercurial, and others - only operates on the filesystem. MySQL and Postgres databases are not technically a part of your project's filesystem, so you can't add those changes to a traditional VCS.
Outside of changing your database from MySQL / Postgres to SQLite (which incidentally is stored as a file in your project directory), Git will have nothing to do with your database.
If you really want to go through the hassle of keeping your database version controlled on the filesystem, then you can potentially look into the following:
- Create a MySQL dump of everything you want to store. Look into webhooks to run a command to import the dump after every push. Update the dump as necessary.
- Use migrations and seeds to keep a snapshot of your database. Look into webhooks to run the appropriate artisan commands to tear down and re-migrate and seed the database after every push. Update your seeds as necessary.
- Switch to SQLite. I don't know if this will even work because I don't even know if Voyager is compatible with SQLite.
Outside of that, you should probably look into a deployment process for your database that involves tools like Capistrano to manage what you need.

maiorano84
- 11,574
- 3
- 35
- 48