문제

Using the Drupal 6 schema API, how do you specify the EXACT size of an int data type? For example, I can do the below query in MySQL:

create table test (foo int(11) unsigned not null);

The drupal 6 schema API only gives me these fixed sizes options of: tiny, small, normal, medium, big.

http://drupal.org/node/159605

I want to create an 'int' data type with a size of 11, to match up with the default drupal 'users' table in the 'created' field.

도움이 되었습니까?

해결책

Looks like I found a way to get it to 11! You CANNOT set your field to be 'unsigned' => 'true'. If you do that, then it auto-defaults to int(10). But if you leave it out, or set it to 'unsigned' => 'false', then it will give you int(11)!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top