I have a column as tinyInteger. Now I would like to add comment to the column with new migration file.
public function up()
{
Schema::table('sales_invoices', function (Blueprint $table) {
$table->tinyInteger('invoice_type')->comment('0 > A Normal Invoice, 1 > A Recurring Invoice');
});
}
Now above is the code I am trying in new schema to add comment, but it doesn't work and gives error.
public function up() {
Schema::table('sales_invoices', function (Blueprint $table) {
$table->tinyInteger('invoice_type')
->comment('0 > A Normal Invoice, 1 > A Recurring Invoice')
->change();
});
}
There are some caveats to using this and you will need to run composer require doctrine/dbal