Reputation: 186
I created an app in Laravel. In the beginning, I made a migration with the following content:
public function up()
{
Schema::create('kundens', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->unsignedInteger('user_id');
$table->string('vorname');
$table->string('nachname');
$table->string('strasse');
$table->integer('plz');
$table->string('wohnort');
$table->string('mail');
$table->integer('telefon');
$table->string('geburtsdatum');
});
}
No I want to add some tables like kaufpreis or "modernisierung". I added them under the other tables but when I save the file and write in the terminal I get the error:
nothing to migrate.
So now how can I add some tables for more information?
Upvotes: 0
Views: 166
Reputation: 1012
You should create a new migration for kaufpreis
and modernisierung
.
The main migration for kundens
did already run (see migrations
table).
php artisan migrate:fresh
is also an option, if you are developing locally.
Don't do this when you work with other people / production as it will erase the tables and create new ones (data will be lost)
Upvotes: 5