From ed2e5f59f9347fbba1c89710130e399bf32d43a1 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:36:26 +0200 Subject: [PATCH] added DB migration note to contributing file --- CONTRIBUTING.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ffbcc9112..4dc5aeda9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -134,7 +134,26 @@ Note: If you change environment variables afterwards or anything seems broken, p ``` -## 7. Contributing a New Service +## 7. Development Notes + +When working on Coolify, keep the following in mind: + +1. **Database Migrations**: After switching branches or making changes to the database structure, always run migrations: + ```bash + docker exec -it coolify php artisan migrate + ``` + +2. **Resetting Development Setup**: To reset your development setup to a clean database with default values: + ```bash + docker exec -it coolify php artisan migrate:fresh --seed + ``` + +3. **Troubleshooting**: If you encounter unexpected behavior, ensure your database is up-to-date with the latest migrations and if possible reset the development setup to eliminate any envrionement specific issues. + +Remember, forgetting to migrate the database can cause problems, so make it a habit to run migrations after pulling changes or switching branches. + + +## 8. Contributing a New Service To add a new service to Coolify, please refer to our documentation: [Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service)