How does it work if I want to add a new column in my production table? I know that I will loose all the data when I make a migration:fresh.
1) is it possible to change the migration and add a new column as I did with the fastnetnr column?
public function up()
{
Schema::create('kontaktforms', function (Blueprint $table) {
$table->increments('id');
$table->string('navn');
$table->string('mobilnr');
//new fastnetnr column added
$table->string('fastnetnr')->nullable();
$table->string('mail');
$table->string('emne');
$table->text('beskrivelse');
$table->timestamps();
});
2) Or do I have to add a new column with php artisan so the output is like this?
public function up()
{
Schema::table('kontaktforms', function($table) {
$table->string('fastnetnr')->nullable();
});
}
</div>