“Laravel -Migrationsindex” Code-Antworten

Laravel -Migration eindeutige Säule hinzufügen

Schema::table('tableName', function($table)
{
    $table->string('column-name')->unique(); //notice the parenthesis I added
});
Sore Seal

Laravel Drop -Säule

// To drop a column, use the dropColumn method on the schema builder.
// Before dropping columns from a SQLite database, you will need to add
// the doctrine/dbal dependency to your composer.json file and run the
// composer update command in your terminal to install the library:

Schema::table('users', function (Blueprint $table) {
    $table->dropColumn('votes');
});
Yingfufu

Laravel -Migrationsindex

$table->index(['account_id', 'created_at']);
Mysterious Moth

Ähnliche Antworten wie “Laravel -Migrationsindex”

Fragen ähnlich wie “Laravel -Migrationsindex”

Weitere verwandte Antworten zu “Laravel -Migrationsindex” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen