Skip to content

Commit 6443ac6

Browse files
authored
fix: move warning block to more logical spot.
1 parent 2e04bce commit 6443ac6

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/developers/addons.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,6 @@ The right relationships make life easier. See the Laravel documentation on relat
227227

228228
Laravel includes a way to create and update tables, called [migrations](https://laravel.com/docs/5.5/migrations). Migrations are ways to programmatically define your tables, and let the framework worry about the exact syntax to use. The advantage to this abstraction is being.
229229

230-
:::warning
231-
232-
When naming your tables, a standard convention that is wise to follow is to prefix your addon's tables with a short indentifier that is unqiue to your addon or group of addons (e.g. `disposable_`, `ch_`, `sp_`, etc.). For example, instead of naming a table `tours`, name it `ch_tours`. This includes pivot tables. See Laravel documentation on how to override the default conventions for table names, foreign relationships, etc. where required.
233-
234-
Not prefixing your tables could lead to unintended consequences, including but not limited to:
235-
236-
* Conflicting with future phpVMS core features that would use the same table name, thereby making it more difficult to update phpVMS at a later date.
237-
* Conflicting with other addons by other 3rd party modules that don't head this warning.
238-
239-
:::
240-
241230
! You should *not* be using raw SQL
242231

243232
There is an `artisan` helper to generate migrations:
@@ -254,6 +243,17 @@ The `app/Database/migrations` directory has the core migrations and is a good re
254243

255244
!!!! Add new migration files when you have to modify a table, etc, after you've released it into the wild. The migrations that are run are kept track of, so if it's seen that it's already run the file, it won't run it again.
256245

246+
:::warning
247+
248+
When naming your tables, a standard convention that is wise to follow is to prefix your addon's tables with a short indentifier that is unqiue to your addon or group of addons (e.g. `disposable_`, `ch_`, `sp_`, etc.). For example, instead of naming a table `tours`, name it `ch_tours`. This includes pivot tables. See Laravel documentation on how to override the default conventions for table names, foreign relationships, etc. where required.
249+
250+
Not prefixing your tables could lead to unintended consequences, including but not limited to:
251+
252+
* Conflicting with future phpVMS core features that would use the same table name, thereby making it more difficult to update phpVMS at a later date.
253+
* Conflicting with other addons by other 3rd party modules that don't head this warning.
254+
255+
:::
256+
257257
### Seeding Data
258258

259259
I've added a few extra features, including adding seed data, including adding seeder data. For example, the `Settings` table:

0 commit comments

Comments
 (0)