ellisv / oxid-console

[UNMAINTAINED] OXID Console is php console application for OXID Shop. It provides an API for writing various commands. We have shipped very common for every oxid shop project commands out of the box.
MIT License
23 stars 17 forks source link

oxMigrationHandler and RecursiveDirectoryIterator #31

Closed ddpkts closed 8 years ago

ddpkts commented 8 years ago

I am a happy OXID Console user, but I had some issues while migrating DB migrations on some linux machines, smth like described here https://bugs.php.net/bug.php?id=48881 - it depends on some locale or whatever system settings.

The problem that migration files are loaded in wrong order in oxMigrationHandler (RecursiveDirectoryIterator) and the whole process fails when ran migrations are being loaded and ran once again.

I have a quickfix on my environment, that sorts files by filename, as you migration files start with timestamp. If this others are having this issue I could provide ar PR on this or maybe there is another better way to load files correctly in RecursiveDirectoryIterator.

screenshot 2016-01-04 16 36 58

ellisv commented 8 years ago

Hey Tomas,

Nice to hear from you and I'm really glad you reported this bug. I'll make some benchmarks if it's worth using SplHeap over ksort tommorow and will let you know about results (: On Jan 4, 2016 4:41 PM, "Tomas" notifications@github.com wrote:

I am a happy OXID Console user, but I had some issues while migrating DB migrations on some linux machines, smth like described here https://bugs.php.net/bug.php?id=48881 - it depends on some locale or whatever system settings.

The problem that migration files are loaded in wrong order in oxMigrationHandler (RecursiveDirectoryIterator) and the whole process fails when ran migrations are being loaded and ran once again.

I have a quickfix on my environment, that sorts files by filename, as you migration files start with timestamp. If this others are having this issue I could provide ar PR on this or maybe there is another better way to load files correctly in RecursiveDirectoryIterator.

[image: screenshot 2016-01-04 16 36 58] https://cloud.githubusercontent.com/assets/2785503/12091797/ef3160f6-b301-11e5-8c86-f59a79a3301c.png

— Reply to this email directly or view it on GitHub https://github.com/EllisV/oxid-console/issues/31.

ellisv commented 8 years ago

@ddpkts I suppose this bug is only available in 1.1 version. Can you confirm that you found this bug at 1.1?

ddpkts commented 8 years ago

@EllisV yes I am using 1.1.x on 5.1.x

ellisv commented 8 years ago

Checkout out the diff for 1.1.8 release: https://github.com/EllisV/oxid-console/compare/v1.1.7...v1.1.8 Does this solve your problem?

ddpkts commented 8 years ago

Thanks @EllisV!

I will and let u know once I will do some deployments.

ddpkts commented 8 years ago

migrations work well :+1: