XF 2.2 Setup tables with details?


Well-known member
I see a lot of setup.php with setup tables without any extra information.

$table->addColumn('news_id', 'int');

$table->addColumn('news_id', 'int', 10);

$table->addColumn('news_id', 'int', 10)->setDefault(0);

$table->addColumn('news_id', 'int', 10)->setDefault(0)->unsigned(true);

and ->nullable() only for blobs?

Is it a good idea to give my fields always a default value, a length and unsigned(true) as long I don't need false?
Top Bottom