[support] Module install / database schema doubt
Austin Einter
austin.einter at gmail.com
Fri Mar 18 00:39:03 UTC 2011
Hi David
Plesee see response inline.
With help of Devel module, when I reinstalled the module, it was creating
tables in database and worked fine.
Best Regards,
Austin
On Thu, Mar 17, 2011 at 8:50 PM, Metzler, David <metzlerd at evergreen.edu>wrote:
> Need a bit more info to help.
>
>
>
> Can I assume from your hooks that you are doing this in drupal 6 and that
> the name of your module is resume_submit.module and the name of your
> install file is resume_submit.install?
>
>
It is Drupal 6. Yes, module file is resume_submit.module and install file is
resume_submit.install.
> Was the module installed when you created the install file? Have you
> tried uninstalling the module and then re-enabling it?
>
After creating install file, I disabled module, cleared cache, enabled
module. With this, install was not taking effect (tables in database were
not cretaed).
>
> ------------------------------
>
> *From:* support-bounces at drupal.org [mailto:support-bounces at drupal.org] *On
> Behalf Of *Austin Einter
> *Sent:* Wednesday, March 16, 2011 8:45 PM
> *To:* support at drupal.org; development at drupal.org
> *Subject:* [support] Module install / database schema doubt
>
>
>
> Hi All
>
> I have a small install file as below.
>
>
>
> *<?php**
> function resume_submit_install()
> {
> drupal_install_schema('resume_table');
> }
> function resume_submit_uninstall()
> {
> drupal_uninstall_schema('resume_table');
> }
> 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.
>
>
>
> Thanks
>
> Austin
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110318/675f60d5/attachment-0001.html
More information about the support
mailing list