-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support database table rollbacks #40
Comments
I agree, this would be pretty awesome. I hadn't built the Table class with rollbacks in mind, so it may take a bit of effort and rethinking things to make it happen. That shouldn't stop us, though! |
I wonder if an update would be best served as a class that is extended and instantiated? This would allow us to make abstract functions for both upgrading,and downgrading. |
IIRC that's how Laravel does it. class YourMigrationClass extends Migration {
/**
* Run the migration
*/
public function up() {}
/**
* Reverse the migration
*/
public function down() {}
} |
Also see: https://make.wordpress.org/core/2021/05/03/feature-project-updates-on-updating-the-updaters/ Specifically outcomes 2 and 3. It talks about database migrations and rollbacks. |
There are some updates about it? I see that some plugin that use berlindb have something for that |
It would be cool to support rollbacks, kind of like Laravel does. For each table upgrade, you'd also write a rollback so you can go forward and go backwards to revert it.
The text was updated successfully, but these errors were encountered: