I need to add a column at first in Sql using laravel migration. i can add new column at any place using after:
Schema::table('tasks', function (Blueprint $table) {
if (Schema::hasColumn('tasks', 'assigned_to_id') == false) {
$table->integer('assigned_to_id')->after('status');
}
});
Table has following fields: project_id , module_id
I need to add column 'id' before project_id. How to achieve this? Thanks in advance!