سؤال

I have generated 2 entities in my bundle and then using app/console doctrine:schema:update --force I recreate database schema. The order of fields that I have defined in the entities does not match the order of fields in the database table. Is there a way to control/define order in which fields are listed in the database table?

Thanks, Z

هل كانت مفيدة؟

المحلول

It's not a problem; If you have generated the schema first then you updated it, the new fields will be just appended to current columns.

Furthermore you can find this different order for columns which has relationship which will be appended, too (on the generation time). In fact it does not create any issue; but if it's important to you, you can change the arrangement through one of the DataBase Management Tools (e.g. phpMyAdmin)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top