我在模块的Drupal 7架构上遇到了麻烦.有4个表,但样本2就足够了:
function mymodule_schema() {
$schema['series'] = array(
'fields' => array(
'id' => array(
'type' => 'serial',
'unsigned' => true,
'not null' => true,
),
'name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => true,
),
),
'unique keys' => array(
'name' => array('name'),
),
'primary key' => array('id'),
);
$schema['sermon'] = array(
'fields' => array(
'id' => array(
'type' => 'serial',
'unsigned' => true,
'not null' => true,
),
'title' => array(
'type' => 'varchar',
'length' …
Run Code Online (Sandbox Code Playgroud)