문제

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