Issue
I wanted to update propel generated classes that are present in the model folder as I have modified my database schema (i.e., I have added one column in a table). What are the steps to update the model classes?
Solution
Please follow below steps to update propel model classes:
Remove all the files inside the
/vendorfolder of your applicationexecute the below command from the folder where
composer.jsonexists$ composer updateset the path variable to /path/to/vendor/bin folder
Run the propel reverse task to generate schema.xml specifying your database credentials
$ propel reverse "mysql:host=localhost;dbname=db;user=root;password=pwd"Output of above command will be
schema.xmlfileReplace your
schema.xmlfile in the project with this new oneFrom the command prompt go to the folder where you copied
schema.xmlfile and execute below commands.$ propel sql:build $ propel model:build
Thats it. Propel model classes should get updated.
Answered By - Raghavendra
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.