Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel migration make column nullable

Schema::table('users', function($table)
{
    $table->string('name', 50)->nullable()->change();
});

This is the correct syntax to revert the migration:

$table->integer('user_id')->unsigned()->nullable(false)->change();
Comment

laravel migration table column nullable

$table->string(/*column name*/, /*size*/)->nullable(true);
Comment

PREVIOUS NEXT
Code Example
Php :: Woocommerce remove add to cart message 
Php :: wp shortcode 
Php :: laravel server sent events 
Php :: how validate the value of object in arraye in laravel 
Php :: Readonly Properties - PHP 8.1 
Php :: Class "AppHttpControllersAdminController" not found in laravel 8 
Php :: wordpress get local date 
Php :: find substring in string php 
Php :: timestamp php 
Php :: clear console php 
Php :: laravel 6 auth 
Php :: IlluminateContractsContainerBindingResolutionException target calss does not exist 
Php :: laravel blade loop if 
Php :: zero padding php 
Php :: Adding data to a laravel collection 
Php :: print asociative array php 
Php :: login form in php 
Php :: jquery serialize php decode 
Php :: laravel eloquent select case when 
Php :: wordpress Warning: Cannot modify header information - headers already sent by 
Php :: return view with variable laravel 
Php :: how to fetch all column values php 
Php :: php extract month and year from date 
Php :: php switch case array 
Php :: how to get shop page url in wordpress 
Php :: doctrine query builder order by multiple 
Php :: image upload in laravel 
Php :: laravel eloquent relationships count 
Php :: how to get index 2nd php 
Php :: guzzle http client 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =