[development] Module install / database schema doubt
austin.einter at gmail.com
Thu Mar 17 11:14:39 UTC 2011
Lee, Dave, Vaibhav
Thanks for your help.
With help of devel module, I reinstalled my custom module and it is working
On Thu, Mar 17, 2011 at 11:44 AM, Dave Reid <dave at davereid.net> wrote:
> Also, your module appears to be named 'resume_submit' so
> resume_table_schema should be named resume_submit_schema and you should call
> drupal_(un)install_schema('resume_submit') as the parameter is the module
> name whos schema is being (un)installed. It's fine to leave the table name
> as resume_table.
> Dave Reid
> dave at davereid.net
> On Wed, Mar 16, 2011 at 10:44 PM, Austin Einter <austin.einter at gmail.com>wrote:
>> Hi All
>> I have a small install file as below.
>> function resume_submit_install()
>> function resume_submit_uninstall()
>> function resume_table_schema()
>> $schema['resume_table'] = array(
>> 'fields' => array(
>> 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' =>
>> TRUE, 'default' => 0),
>> 'name' => array('type' => 'varchar', 'not null' => TRUE, 'default'
>> => ''),
>> 'email' => array('type' => 'varchar', 'not null' => TRUE, 'default' =>
>> 'altemail' => array('type' => 'varchar', 'not null' => TRUE, 'default'
>> => ''),
>> 'indexes' => array('uid' => array('uid'),),
>> 'primary key' => array('name'),
>> * return $schema;
>> When I install the custom module, it installs without any warning/error.
>> But on form submit, when I try to save some data, it gives warning (table
>> does not exist).
>> Can somebody help me to understand, what could be the issue.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development