Db.xml doesn't work in block installation
Permalink
Hello everybody.
I don't understand a thing... when i install a block that i've customized, the db.xml doesn't work but the block installs itself.
This my db.xml :
I took a base for build the db.xml, the base is db.xml of the basic block "Survey" in C5. So why doesn't it ?
Do you have an idea ?
I don't understand a thing... when i install a block that i've customized, the db.xml doesn't work but the block installs itself.
This my db.xml :
<?xml version="1.0"?> <schema version="0.3"> <table name="btSurveyCustom"> <field name="bID" type="I"> <key /> <unsigned /> </field> <field name="requiresRegistration" type="I1"> <default value="0"/> </field> </table> <table name="btSurveyCustomQuestionTypes"> <field name="typeID" type="I1"> <key/> <unsigned/>
Viewing 15 lines of 73 lines. View entire code block.
I took a base for build the db.xml, the base is db.xml of the basic block "Survey" in C5. So why doesn't it ?
Do you have an idea ?
Hm, what directory do you have your db.xml file in? Is it just in the root of your block directory?
Another common reason is the table name not matching that specified in the block controller and conforming to the naming conventions for the block class. unless all 3 tie together .... :-(
Yes in the block directory ;) I've found a solution. The problem came from my controller, i've forgot to define the protected variable of table name ($btTable) (as Johnthefish explains)