I am developing a block module for Drupal 6.

I now want to add a custom table in a MySQL database to store some data (previously I was not using any custom database tables).

I created the .install with my schema def in the function TAS_schema

and these functions:

function TAS_install() {
// Create my tables.
drupal_install_schema('TAS');
}

function TAS_uninstall() {
// Drop my tables.
drupal_uninstall_schema('TAS');
}

When I disable and enable the module "TAS" I either get a blank screen or a success message. However, in both cases, the table is not created.

Does anyone know what the problem could be? Is there a log I can look at?

Comments

Zyava’s picture

Do you have implementation of hook_schema()?

function TAS_schema () {
// your table definition
...
}
athom09’s picture

I posted the solution on another blog first.

Here is the link

https://techknowhow.library.emory.edu/node/83