You need to first create a hook_schema() that defines the *tables*, and nothing else. At that point schema.module will go through and create proper definitions for all of the fields, indexes, etc in said tables. It appears that was done to avoid the module choking and dying on complex DB scenarios where Drupal was sharing its db with other systems, resulting in jillions of non-drupal tables to parse. --Jeff On Apr 2, 2008, at 3:19 AM, Angela Byron wrote:
Nancy Wichmann wrote:
Karoly Negyesi wrote:
see schema.module in contrib. I installed that when working on the registry patch and was not really able to find where can I get the schema definiton of the not-yet-defined registry table. I might have missed something absolutely obvious. There is an "Inspect" tab that will show you proposed schema for all unknown tables. I just copy and paste - with a bit of reformatting. Voila! Instant hook_schema.
Can you confirm that this works? I tried with 6.x-1.2 with a new "foo" table I'd created by hand in PHPMyAdmin, and got a notice, a warning, and an empty schema array apart from the primary key.
I also noticed an inspectschema module in Frando's sandbox but that has fatal errors.
Am I missing something obvious? -Angie