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