Modify schema with a plugin

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
ceciliadatko

Modify schema with a plugin

Post by ceciliadatko »

Hello, I need help!!! When I'm installing a plugin I want to create a table in mantis schema. The plugin is correctly installed but the schema not has the new table.
I write the function schema() in the register.php file like this:

function schema() {
return array(
array( 'CreateTableSQL', array( plugin_table( 'symbol' ), "
id I NOTNULL UNSIGNED AUTOINCREMENT PRIMARY,
name C(50) NOTNULL DEFAULT \" '' \" ,
value C(200) NOTNULL DEFAULT \" '' \",
type I NOTNULL
",
array( 'mysql' => 'DEFAULT CHARSET=utf8' ) ) ),
);
}//function

why the table would not created???????????

THANKS!!!!!
atrol
Site Admin
Posts: 8575
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Modify schema with a plugin

Post by atrol »

Did you ensure that your database user has privileges to create tables?
Please use Search before posting and read the Manual
Paul Götze
Posts: 1
Joined: 14 Mar 2013, 12:11

Re: Modify schema with a plugin

Post by Paul Götze »

I was faced with the same problem and spent some hours on the problem.
My solution can be found here: http://stackoverflow.com/questions/1524 ... ot-created

Hope this works for you!
Post Reply