Answer: Laravel 5.2 migration comment on column in migration
Nagarajan R
Posted on September 15, 2020
You can use comment()
method along with change()
Schema::table('users', function(Blueprint $table) {
$table->string('name')->comment('Name of the user')->change();
});
To make sure it migrated properly
mysql> show full columns from users like 'name'; +-------+--------------+--------------------+------+-----+---------+-------+---------------------------------+------------------+ | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment…
💖 💪 🙅 🚩
Nagarajan R
Posted on September 15, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
privacy Caught in the Crunch My Journey from Snacks to 2 Million Exposed Users Privacy
November 30, 2024
devchallenge Submission for the DevCycle Feature Flag Challenge: Feature Flag Funhouse
November 30, 2024