-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong unique index from migration #709
Comments
Can you please provide a working script to replicates the issue? |
On Laravel migration script: TABLE SLAVE: |
migration, resp. function compileUnique it should use "lower()" function only for var/text type of DB colums (not for int) |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 7 days since being marked as stale. |
Wrong unique index
this update
#600
46e6f7b
made unique index with lower() PHP function in migration laravel script
for example: create unique index card_types_id_card_type_uk on card_types (lower(id_card_type))
problem:
if I want add make foring key to this master table/colum (id_card_type)
it emit error: that no primary kye or unique index exist
Code snippet of problem
public function compileUnique(Blueprint $blueprint, Fluent $command)
{
$columns = array_map(function ($column) {
$column = $this->wrap($column);
return "lower({$column})";
}, $command->columns);
Please remove lower function in compileUnique()
System details
The text was updated successfully, but these errors were encountered: