Witam mam utworzoną baze danych w Laravel i teraz chciałbym dodać nową kolumnę w istniejącej już bazie danych jak mam to zrobić z poziomu konsoli?
Próbowałem komędą > **php artisan make:migration add_price_to_products_table --table=products **>
Tworzy się nowa migracja ale baza danych products nie utwarza nowej kolumny price.
**php artisan db:seed ** i php artisan migrate też nic nie daje
Baza na localhost MySQL
mój plik z migrations:
class CreateProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('products', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->text('detail');
$table->text('price');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('products');
}
}