Hello!
I must share my experience with modx3 and migxdb. It’s first time I use migxdb, and I was a little frustrated with migxdb because I couldn’t get it to work until this morning!
OK. First thanks a lot @bruno17 for your plugin.
And thanks a lot @halftrainedharry for your help with your video tutorial (without it I wouldn’t have been able to understand how migxdb works)
But as said it was not simple:
In my case the name of the package must be written with a capital NameCollect (without hyphen otherwise the manager does not work anymore…). Without capital letter, the table is not created. With everything works as it should to remove or add a column.
The 2nd thing, in my case, the package name must be NameCollect, but in the schema the package name is NameCollect\Model. Without \Model, no table created…
But then the migx configuration did not work as expected. That is, in MIGXdb-settings, I tried with the package name NameCollect and NameCollect\Model, but no connection with the database was made (check under Column, Select db-fields). My Classname is namelist.
Finally I found help on github: https://github.com/Bruno17/MIGX/pull/401. I made the 2 file corrections as written by @halftrainedharry and tried as package name NameCollect\Model and as classname NameCollect\Model\namelist
And there it worked!
I am on modx 3.0.3pl and with migx 3.0.1-beta1
My final schema is:
<?xml version="1.0" encoding="UTF-8"?>
<model package="NameCollect\Model" baseClass="xPDO\Om\xPDOObject" platform="mysql" defaultEngine="InnoDB" version="3.0">
<object class="namelist" table="namecollect_namelist" extends="xPDO\Om\xPDOSimpleObject">
<field key="artist" dbtype="varchar" phptype="string" precision="100" null="false" default=""/>
</object>
</model>
I always have 2 errors on error_log:
/core/components/migx/model/migx/migx.class.php : 884) PHP warning: Undefined variable $configpath
core/components/migx/processors/mgr/default/update.php : 321) PHP warning: Undefined array key "pubishedon"
The 2nd is just a little correction to do on update.php file. But the first one, I don’t know. But until now, In only have the error but no problem elsewhere.
Voilà!