私のモジュールをdrupal6からdrupal 7に変換しようとしていますが、これは私のコードです。データベーステーブルは作成されません。Drupal7 .installスクリプトが動作しない
function example_install() {
drupal_install_schema('example');
}
/**
* Implements hook_schema().
*/
function example_schema() {
$schema['example'] = array(
'description' => 'example settings',
'fields' => array(
'name' => array(
'description' => 'name',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'age' => array(
'description' => 'age',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
),
) ,
);
return $schema;
}
何かを間違って説明することはできますか。
?あなたがこれを実行するときに何かが起こる? – ManseUK
いいえ、モジュールが有効になっているだけです。 – Ramesh