私はこのエンティティを持っています:
$schema['apiuser'] = array(
'description' => 'The base table for api_user.',
'fields' => array(
'apiuser_id' => array(
'description' => 'The primary identifier for an artwork.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'public_key' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => "Foreign key: {file_managed}.fid of user's picture.",
)
),
'unique keys' => array(
'id' => array('apiuser_id')
),
'primary key' => array('apiuser_id'),
);
後で新しいフィールドを追加しました:
,
$schema['apiuser'] = array(
'description' => 'The base table for api_user.',
'fields' => array(
'apiuser_id' => array(
'description' => 'The primary identifier for an artwork.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'public_key' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => "Foreign key: {file_managed}.fid of user's picture.",
),
'user_id' => array(
'description' => 'The primary identifier for an artwork.',
'type' => 'int',
'not null' => TRUE,
)
),
'unique keys' => array(
'id' => array('apiuser_id')
),
'primary key' => array('apiuser_id'),
);
Drupal はそれぞれのテーブルを mysql に変更しないので、手動で変更しました。しかし、エンティティを保存しようとすると、新しいフィールドが入力されません。devel モジュールをインストールし、'drush cc all' を使用してキャッシュをクリアし、モジュールを非アクティブ化およびアクティブ化しましたが、それでも機能しません