Laravel like migration functions |
I recently saw the migration statements on Laravel and was thinking, can we work on something like that too for CI4? I'm thinking something like this
PHP Code: $this-forge->string("name"); This would be the equivalent of PHP Code: $this-forge->addField([ I could work on it if that's okay.
Of course you can realize your idea and submit a PR. Don't forget about tests and code style.
Also, do not forget about the DBMS supported by the framework.
The idea that adding methods to specify table columns is no problem.
But it seems that the API "$this->forge->string("name")" is not good, or does not make sense. The Forge class does many things, not only column definition.
Thanks for pointing that out. Is it okay if I add it to the Migration class.
|
Welcome Guest, Not a member yet? Register Sign In |