Migration to Add Comment to Existing Column

Posted 5 months ago by rijans

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.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.