Create SimpleMigration option #43143
Unanswered
mylesduncanking
asked this question in
Ideas
Replies: 2 comments 1 reply
-
I like the concept, but do have a couple of comments:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Once it is available in packagist I will certainly consider using it as part of the new open source project I am working on. 😃 And if I use and find areas to improve it, then I will certainly contribute as I generally do. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Migration classes seem to be very bloated especially when creating a simple migration that just adds set of columns.
I have created a "SimpleMigration" class which I use to add columns but think others may find it useful if it was added properly.
I think there is more that could be done with this and my code below is best viewed as a "proof of concept" sort of thing.
A useful point to note is that there is also "predefined" types based on the column names so if the name contains "_id" but no type is specified it will default to "unsignedBigInteger".
Migration file:
SimpleMigration class:
Beta Was this translation helpful? Give feedback.
All reactions