Share icon

Schema  Api Drupal 7 and Drupal 8 not accept the datatypes Like data or datatime and generate the warning and sql syntax error while installing the drupal module in install 

normally we Define like this:

'dob' => array(
		  'description' => 'Date of Birth',
		  'type' => 'date',
		  'not null' => FALSE,
		),

See the dob datatype below the correct version of using

'dob' => array(
		  'description' => 'Date of Birth',
		  'type' => 'varchar',
		  'mysql_type' => 'date',
		  'not null' => FALSE,
		),

 

NOTE : Drupal 8 array() replaced By Square brakets like

 

 'dob' => [
		  'description' => 'Date of Birth',
		  'type' => 'varchar',
		  'mysql_type' => 'date',
		  'not null' => FALSE,
		],

Add new comment

Restricted HTML