-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add commands to export and import SQLite databases #188
Comments
We could consider to have SQLite-MySQL and MySQL-SQLite implementation a part of https://github.com/wordPress/sqlite-database-integration/. |
I talked with @schlessera and came up with the proposed plan:
Then, other WP tools, like Sandbox Site powered by Playground or the sqlite-database-integration plugin, could reuse the import/export library. Any thoughts? What feedback do you have? |
This seems reasonable, although I would prefer to implement as a WP-CLI command first and then figure out the abstraction. I think the abstraction could quickly rabbit hole into zero progress. |
@danielbachhuber I get the concern, but I think the entire point here is to build something reusable. The way WP-CLI commands are usually built just results in spaghetti code that can hardly be salvaged - unless you have a strict conceptual separation from the start, at which point a distribution via a separate package is just a minor detail. |
@schlessera Ok. We need a version of this in the short term, though. @wojtekn Maybe our first draft can be an internal implementation, and then we can produce a final version as a public library? |
+1 on separating this from a start. Starting as an internal implementation sounds good if that's later turned into a reusable library.
All these combinations are covered by a single, existing exporter. The existing Sandbox Site plugin produces a MySQL-compliant dump from either MySQL or SQLite. That dump can then be imported into MySQL verbatim, or into SQLite using the SQLite database integration plugin.
Looping in @brandonpayton. |
We work on that under wp-cli/db-command#259 |
Some additional considerations:
This feature idea is especially pertinent given that Sqlite integration is rapidly developing:
But even outside this context, having a single-file binary-file backup is nice to have and work with. |
For increased compatibility with SQLite, it would be nice to be able to:
I think these features could live inside of
wp db export
andwp db import
.The text was updated successfully, but these errors were encountered: