Hello all people,
I want to add a foreign key to a table, but i can't figure out how to create this foreign key in my schema file
function schema() {
return array(
array('CreateTableSQL', array(plugin_table('my_table'), "
id I NOTNULL UNSIGNED AUTOINCREMENT PRIMARY,
...,
<-------------- add a foreign key constraint + reference to the other table here + delete cascade
")),
And in the MantisBT documentation https://www.mantisbt.org/docs/master/en ... _Guide.pdf :
(page 9)
Schema DefinitionTODO: Discuss the ADODB datadict formats and the format MantisBT expects for schema definitions.Installation / Upgrade ProcessTODO: Discuss how MantisBT handles a database installation / upgrade, including the use of the configsystem and schema definitions
Soo .... Theses TODOs are here since the begining of mantisBT ?
Thanks for your help
Need a help!
Moderators: Developer, Contributor
Re: Need a help!
the ToDo's are not there from the ebginning but from start of using ADODB.
If you cannot do it in the schema file, you still can use a regular sql statement to get it done, just be creative.
In addition you can come up with proposals how it could be done in the schema file.
If you cannot do it in the schema file, you still can use a regular sql statement to get it done, just be creative.
In addition you can come up with proposals how it could be done in the schema file.