Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations command should use the UTC datetime when creating new migrations #2018

Closed
lonnieezell opened this issue May 21, 2019 · 6 comments
Closed
Assignees

Comments

@lonnieezell
Copy link
Member

By ensuring all migrations are created using UTC, then teams from around the world can work together better.

@MGatner
Copy link
Member

MGatner commented May 24, 2019

To piggyback on this, I think we already discussed it but I would love to see MigrationRunner process migrations universally by their UTC datetime, instead of namespace-by-namespace (which doesn't allow devs to make migrations on top of a module's migrations without intentionally staggering them).

@lonnieezell
Copy link
Member Author

@MGatner You're absolutely right. I knew there was more to the discussion but didn't take the time to search for what it was. So thanks!

That could only work for timestamp-based migrations, though.

@lonnieezell lonnieezell added this to the 4.0.0-rc.1 milestone Jun 4, 2019
@lonnieezell lonnieezell self-assigned this Jun 12, 2019
@MGatner
Copy link
Member

MGatner commented Jun 20, 2019

I'm curious what your plans are on version control vis-a-vis namespaces. Right now App gets precise control via $currentVersion in app/Config/Migrations.php, but namespaces must be handled manually with the CLI migrate -n commands. Any plans to unify versions across namespaces, or differentiate the config variable, or some other means of version control?

@lonnieezell
Copy link
Member Author

I haven't gotten back to this just yet, but I'm thinking this will need a modification that records a batch number with each migration, then it can record the fully qualified classname in the database so that it will know which classes across all namespaces were part of that last up and should be brought down.

Just read back over what you wrote though and realized that's not what you were asking. :) To be honest, I've never really used $currentVersion in my work, so I'm not 100% clear what the best way to handle it might be (or if it simplifies things just to rip that out...) Open to ideas on that part.

@MGatner
Copy link
Member

MGatner commented Jun 20, 2019

After posting that I was thinking "maybe I should have included ditching it". I think that's the way to go - it's a bit vestigial at this point already, and definitely doesn't fit well with a multi-source migration scheme.

@MGatner
Copy link
Member

MGatner commented Aug 13, 2019

This is wrapped up with the migration refactor! Safe to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants