I am integrating Doctrine 2 in my current CodeIgniter 3 project In command-line,when using doctrine command, for example creating database schema from an entity I usually do this.
$ ./application/vendor/bin/doctrine orm:schema-tool:create
Is it possible to create a shortcut for it so that in command line, instead of typing the whole path,
$ ./application/vendor/bin/doctrine orm:schema-tool:create
I will just type
$ doctrine orm:schema-tool:create,
if possible, any ideas on how to do this?
I tried this code
export PATH=${PATH}:/application/vendor/bin/doctrine
Doesn't work.Any Ideas?
The code you aim to type is still too long to be practical. I'd recommend using shell aliases, e.g.:
Then I just run:
And entities <=> database diff is shown. Then if everything works, I update the database by: