Core: configurable migrations, seeds, views directories paths

Created on 5 Sep 2018  路  9Comments  路  Source: adonisjs/core

Why this feature is required (specific use-cases will be appreciated)?

easily plug-able application modules

Have you tried any other work arounds?

I tried to setup modules seeds in sub directories . but it didn't work

Are you willing to work on it with little guidance?

yes

Most helpful comment

Large products is subjective, having a way to club multiple sub-apps to make a larger app is helpful but that is way beyond just views or migrations.

As I said earlier, I have plans to add support for sub-apps. So closing this for now :)

All 9 comments

I don't see where this addition will help. Can you please share some use cases where changing the directory path to something else if really helpful?

I believe it could be nice to be able to add a directory to the lookup (not changing).

An example would be a package that adds his own migrations. Then Adonis will merge both folder and run migrations.

Yeah but that removes the transparency in which order the migrations will be executed? Also what if I want to change their order?

Also what if I want to change their order?

You don't because you don't need it.

This is how Laravel Passport, Laravel Scout, Laravel Spark and a lot of others Laravel sub-apps works. That would be awesome if we could also create sub-app in the Adonis ecosystem.

I am not sure what all issues are faced by the users of these packages and what work-around Laravel community has found around that.

To make it more accessible, I would better have a file, where you can require migrations from anywhere and decide the order.

module.exports = [
  './migrations/something.js',
  'some_module/migrations/migration.js'
]

That would be awesome if we could also create sub-app in the Adonis ecosystem
Yeah I have plans for something like this

Views directories paths will be useful feature, especially for large projects imho.

Large products is subjective, having a way to club multiple sub-apps to make a larger app is helpful but that is way beyond just views or migrations.

As I said earlier, I have plans to add support for sub-apps. So closing this for now :)

I don't see where this addition will help. Can you please share some use cases where changing the directory path to something else if really helpful?

sub applications , packages for example users permissions package, ... etc

any chance we can help to speed up this sub-apps plan ?


Yeah but that removes the transparency in which order the migrations will be executed? Also what if I want to change their order?

migrations for the first time can be run based on the directory order in the config file . then it is based on migrations table information .

Large products is subjective, having a way to club multiple sub-apps to make a larger app is helpful but that is way beyond just views or migrations.
controllers can be called from any where if they used from the routes file . which can be imported from the packages if needed .

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amrayoub picture amrayoub  路  4Comments

itsg2jakhmola picture itsg2jakhmola  路  3Comments

imperez picture imperez  路  4Comments

blendsoft picture blendsoft  路  3Comments

Extarys picture Extarys  路  4Comments