Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel default string length migration

$table->string('name', 800);
Comment

laravel migration string length

//Add this code to your AppServiceProvider
use IlluminateDatabaseSchemaBuilder;


public function boot()
{
    Builder::defaultStringLength(191);
}
Comment

laravel migration text length

For Laravel & Mysql

String types
CHAR - 1 to 191 (trailing spaces removed)
STRING - 1 to 16,300 (user defined)
TEXT - 1 to 65,535
MEDIUMTEXT - 1 to 16,777,215
LONGTEXT - 1 to 4,294,967,295

Integer types
TINYINT - 0 to 255 (unsigned) | -128 to 127 (signed)
SMALLINT - 0 to 65,535 (unsigned) | -32,768 to 32,767 (signed)
MEDIUMINT - 0 to 16,777,215 (unsigned) | -8,388,608 to 8,388,607 (signed)
INT - 0 to 4,294,967,295 (unsigned) | -2,147,483,648 to 2,147,483,647 (signed)
BIGINT - 0 to 18,446,744,073,709,551,615 (unsigned) | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (signed)

Floating types
Structure: `([max decimal places], [max precision])`
FLOAT - ([0-7], [0-23])
DOUBLE - ([0-14], [24-53])
DECIMAL - ([0-65], [0-30])
Comment

PREVIOUS NEXT
Code Example
Php :: array pop php 
Php :: cronjob php linux 
Php :: php json decoding as string incorrectly 
Php :: php comment 
Php :: how to get index 2nd php 
Php :: replace all occurrence char in string php 
Php :: give custom field name in laravel form validation error message 
Php :: laravel with callback 
Php :: Only variables should be passed by reference in 
Php :: In PackageManifest.php line 122: Undefined index: name 
Php :: laravel seeding with relationships 
Php :: combine 2 columns search query laravel 
Php :: add shortcode in wordpress 
Php :: fast excel export laravel 
Php :: double where condition in laravel 
Php :: laravel apiresource 
Php :: laravel route contains particular segment 
Php :: laravel 6 pagination example 
Php :: laravel where not equal 
Php :: laravel many to many relation update 
Php :: php sort array by value 
Php :: php redirect with query string 
Php :: laravel test mail 
Php :: check if array is empty php 
Php :: laravel compare date timestamp 
Php :: SoapClient Laravel 8 
Php :: enqueue css wordpress 
Php :: how to pass token with post request laravel 
Php :: date time format php 
Php :: php undefined function mysqli_fetch_all() 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =