“migracja laravel usuń unikalne ograniczenie” Kod odpowiedzi

migracja laravel usuń unikalne ograniczenie

/** To drop an index you must specify the index's name. 
Laravel assigns a reasonable name to the indexes by default. 
Simply concatenate the table name, the names of the column in the index, 
and the index type **/

// Format of unique key tableName_column_unique
$table->dropUnique('users_email_unique');
Smiling Starling

migracja laravel usuń unikalną

//The UNique need be a constraint name
// This name has this format:
// [TABLE_NAME]_[COLUMN_NAME]_unique
// For 'users' table and 'user_code' column, whe get the name:
// users_user_code_unique
$table->dropUnique('users_user_code_unique');

//The inverst is 
$table->unique('user_code');
Tiago F2

Odpowiedzi podobne do “migracja laravel usuń unikalne ograniczenie”

Pytania podobne do “migracja laravel usuń unikalne ograniczenie”

Więcej pokrewnych odpowiedzi na “migracja laravel usuń unikalne ograniczenie” w PHP

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu