Closed calebdw closed 1 year ago
Hi @CalebDW , thank you for reporting.
The table indexes are randomly ordered.
This is more like a feature request to sort the table indexes to maintain consistent ordering.
I could provide an option to sort the index alphabetically.
Please let me know if this solution would be appropriate for your needs.
Ah that explains it, and that should work. I just need subsequent calls to create the same migration file when the schema remains unchanged.
I'm not sure that an extra option has to be created for it...what's the harm in making it sort alphabetically by default?
Initially, I was leaning towards keeping things the same.
But now that I think about it, you might be right. I don't really see any harm in having alphabetical sorting as the default option.
I'll run some tests and if everything works fine I will add this feature.
@CalebDW Released with tag v6.9.0
, thank you.
Describe the bug Hello!
I'm using this package to generate a dummy (squashed) migration file for Larastan to read since it doesn't support reading Postgres Schema Dumps.
However, I've noticed that if I regenerate the migration file (even when there have not been any schema changes) that a few lines are reordered which necessitates redundant git commits.
To Reproduce Steps to reproduce the behavior:
php artisan migrate:generate --table-filename create_tables.php --skip-log --skip-proc --skip-views --squash
Expected behavior I expect the migration file to remain unchanged when there have not been any schema changes.
Screenshots
Details (please complete the following information):
doctrine/dbal
]:Additional context Add any other context about the problem here.