I'm using Symfony with Propel ORM v.1.3. I need to change table schema in task, remove few columns exactly. How can I do that? I saw method addColumn in TableMap class, but there was no removeColumn or deleteColumn method.

有帮助吗?

解决方案

If you want to remove a column you have to change the schema.xml and then migrate your database.

IMHO the Propel ORM isn't designed to add or remove columns programmatically. The addColumn function in the TableMap class isn't either. So it would be best if your task would somehow automate the steps described in the above mentioned documentation for migrations.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top