Open phylogram opened 4 years ago
I guess you've to create the tables with WPDB class, or you can run through the ORM. Basically this library builds the query via Eloquent and runs via $wpdb
. Using ORM is always slower. This library doesn't act like Laravel migrations. So you should create the tables usually you do.
When I create new tables, I usually would create them with a
register_activation_hook
hook and callback and drop them withregister_deactivation_hook
… How can I make sure the tables for custom models are going to be created at activation and dropped with the deactivation of my plugin?Thanks for this repository by the way! Really made things more flexible, then the usual WP_Query search!