Die*_*ick 0 php laravel laravel-5
我在Laravel创建了一个应用程序.最初,我使用以下内容进行了迁移:
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');
});
}
Run Code Online (Sandbox Code Playgroud)
不,我想添加一些像kaufpreis或"modernisierung"的表.我在其他表下添加了它们,但是当我保存文件并在终端中写入时,我收到错误:
什么都没有迁移.
那么现在我如何添加一些表格以获取更多信息?
您应该为kaufpreis和创建一个新的迁移modernisierung.
kundens已经运行的主要迁移(migrations见表).
php artisan migrate:fresh 如果您在本地开发,也是一种选择.
与其他人/生产合作时不要这样做,因为它会擦除表并创建新表(数据将丢失)
| 归档时间: |
|
| 查看次数: |
68 次 |
| 最近记录: |