Skip to content

v2.0.11

Choose a tag to compare

@gfazioli gfazioli released this 25 Sep 07:59
· 12 commits to master since this release

Eloquent now works on WordPress running on SQLite.

Eloquent

  • When WordPress runs on SQLite, Eloquent connects to the same SQLite file (the one FQDB points at). That covers WordPress Playground, WordPress Studio and any site with the SQLite Database Integration plugin. Up to 2.0.10 Eloquent always opened a MySQL connection from DB_HOST, DB_NAME, DB_USER and DB_PASSWORD, so on those sites every Eloquent query failed. On playground.wordpress.net, every example on the Database demo's Eloquent ORM page threw (#110, #113).
  • The WordPress tables keep their names on SQLite, so models work unchanged, and what Eloquent writes is what $wpdb reads. On SQLite, create tables through WordPress (a WP Bones migration or dbDelta()): a table made with Eloquent's schema builder can be queried, but WordPress doesn't list it.
  • MySQL sites get exactly the connection they had before.

Upgrading

Drop-in for 2.0.x: composer update wpbones/wpbones.

Full Changelog: v2.0.10...v2.0.11