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

ORM: Migrations #123

Open
4 tasks
Biromain opened this issue Sep 20, 2016 · 2 comments
Open
4 tasks

ORM: Migrations #123

Biromain opened this issue Sep 20, 2016 · 2 comments

Comments

@Biromain
Copy link

Migration for ORM like Phinx :

  • Generate migration from cli
  • Management from cli and code Phinx Commands

File format like YYYYMMDDHHMMSS_my_new_migration.php
If migration don't work as planned, we can fix it and just change date to current for re-execute it

  • Method up()
  • Method down()

We can update schema with entities but we are going to loose data on column rename, etc.
What do you think about that.
Regards,

@nibra nibra added this to the X.0 milestone Sep 20, 2016
@nibra
Copy link
Member

nibra commented Sep 20, 2016

Yes, good idea! Actually, Phinx is already on my (internal) list as a candidate for migration handling. It should work in conjunction (or replace?) the SchemaManager (issue #101)

@Biromain Biromain changed the title [Idea] ORM: Migrations ORM: Migrations Sep 21, 2016
@Biromain
Copy link
Author

I'm back after some tests.
I dont think we can use both in conjuction.
Or perhaps extension developer can define a mode in config.

SchemaManager detect and apply modifications by himself on db
Migrations execute developer instructions on db with ability to make treatment on data and rollback (rollback of structure, not data).

If I am a large project based on Joomla, I would not trust an upgrade program for db changes.

Another idea, why not just able developer to generate migration file from schemamanager result before make his extension release.

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

2 participants