Skip to content
Snippets Groups Projects
Verified Commit 367aea1c authored by Gael Yvert's avatar Gael Yvert
Browse files

more dev doc

parent f54ebb3d
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,11 @@
Thank you for contributing to MyLabStocks! Please see below some useful information and guidelines.
## Table of Contents
## Table of Contents <a name="Contents"></a>
1. [Where are Classes ?](#whereclass)
2. Database
3. Tracking functionality tables
2. [Database](#Database)
3. [Tracking functionality tables](#Trackingfunctionalitytables)
4. [Releasing](#release)
5. [External documentation](#externaldoc)
......@@ -19,12 +19,16 @@ Thank you for contributing to MyLabStocks! Please see below some useful informat
- *Views* are in 'resources/views/'. Views that overriding the views of Voyager are in folder 'resources/views/vendor/voyager/'
- *Controllers* are in 'app/Http/Controllers/'
## Database Migrations and Seeding
*[Back to Contents](#Contents)*
## Database Migrations and Seeding <a name="Database"></a>
It is important to build the database using migrations, to ensure version tracking and safe evolution of the application in the future.
Here are some memo of commands.
*[Back to Contents](#Contents)*
#### To create a table called `suppliers`:
```sh
php artisan make:migration create_suppliers_table --create=suppliers
......@@ -62,19 +66,23 @@ php artisan db:seed --class=SuppliersTableSeeder
#### Relationships
We build relationships by editing the models and adding optional details in voyager's BREAD editor.
*[Back to Contents](#Contents)*
## IMPORTANT considerations regarding VERSIONING and Voyager
Voyager offers the possibility to create, modify and delete tables of the database. However, when doing so, there is no versioning/history records of these modifications. Therefore, **DO NOT MODIFY TABLES FROM WITHIN VOYAGER**. Please work exclusively with migrations as described above when creating/modifying tables.
*[Back to Contents](#Contents)*
## Git Functionalities Tables <a name="Trackingfunctionalitytables"></a>
## Git Functionalities Tables
When using voyager to develop MyLabStocks, a number of application functionalities are recorded in tables of the database. For example, BREADs are stored in `data_types` and `data_rows`.
An important consequence of this is that these functionalities are not tracked by git, because we git the code but we will never git the database of course. So, how are we going to keep track of th functionalities stored in the database tables?? This issue is discussed by voyager's developers themselves [here](https://github.com/the-control-group/voyager/issues/1030).
An important consequence of this is that these functionalities are not tracked by git, because we git the code but we will never git the database of course. So, how are we going to keep track of the functionalities stored in the database tables?? This issue is discussed by voyager's developers themselves [here](https://github.com/the-control-group/voyager/issues/1030), where they say that this issue is solved in Voyager version 2.
We propose a solution to this, which is based on [iseed](https://github.com/orangehill/iseed). The idea is simple: we create seeders of the functionality tables, and we git these seeders.
Before upgrading to Voyager v2, we propose a temporary solution to this, which is based on [iseed](https://github.com/orangehill/iseed). The idea is simple: we create seeders of the functionality tables, and we git these seeders.
We therefore ask you to follow the procedure described in this example:
......@@ -103,6 +111,8 @@ So, what happened?
- Your BREADs should be functional as they were prior to your edits on the dev branch.
- Your MENU tables are back to what they were, **but you don't see the changes from the Voyager Menu Builder**. To actualize your pages, click on a menu item that you know is conserved (or create a new menu item if you're not sure) and on the dialog box of this item click on **update**. This will tell Voyager to read again the menus and menuitems tables and your page should now display your actualized menus.
*[Back to Contents](#Contents)*
## Releasing <a name="release"></a>
### Types of release and their branches
......@@ -156,6 +166,8 @@ git merge vZ.Z.Z # change with tag name of the new version
```
- Upgrade a server (a VM machine) dedicated to qualification of stable releases and make a few tests to see if all is ok.
*[Back to Contents](#Contents)*
## External documentation <a name="externaldoc"></a>
MyLabStocks is entirely based on laravel and voyager. Most fo the questions you may have will find answers in these pages:
......@@ -171,3 +183,4 @@ For questions related to styles:
- [HTML tutorial](https://www.bitdegree.org/learn/html)
- [Javascript tutorial](https://www.bitdegree.org/learn/javascript)
*[Back to Contents](#Contents)*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment