Spustite príkaz migrácie v laraveli

Príklady kódu

4
0

vrátenie migrácie

php artisan migrate:rollback
0
0

obmedzená migrácia Laravelu

Schema::table('posts', function (Blueprint $table) {
    $table->foreignId('user_id')->constrained();
});

/* The foreignId method is an alias for unsignedBigInteger while the
 * constrained method will use conventions to determine the table and
 * column name being referenced. If your table name does not match
 * Laravel's conventions, you may specify the table name by passing it
 * as an argument to the constrained method:
*/

Schema::table('posts', function (Blueprint $table) {
    $table->foreignId('user_id')->constrained('users');
});

V iných jazykoch

Táto stránka je v iných jazykoch

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................