Laravel 使用數據型態 biginteger 為自動預設 ,其來有自嗎?
EX:2014_10_12_000000_create_users_table.php 中 $table->bigIncrements('id');
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
});
}
我自己評估我的資料量id 頂多10位數 就已經綽綽有餘,請教一!下我若改成如下:
使用 integer 請問適當嗎? 有較省空間嗎? 還是只是瞎操心,使用bigInteger 其實也用不了多少空間的,尤其現在的主機容量都很大。
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
自覺是個十分好笑的問題,不知道眾高手大大們剛初學的時候,有過這樣"想問又怕見笑"的心情嗎?