How can I remove unique column laravel 5 - laravel

How can I dropUnique the column a_b from z table?
If it would be just column a, we can do this:
$table->dropUnique('z_a_unique');
I've tried:
$table->dropUnique('z_a_b_unique');
But obviously it didn't work.
Thanks for your help in advance!

dropUnqiue() will drop index, not the column. You need to use dropColumn() after dropUnique():
$table->dropColumn('a_b');

Actually, the answer is in the question, sorry guys, it works like this:
$table->dropUnique('z_a_b_unique');
And solved my problem

Related

How can I define the length of increments in laravel migrations?

Hi I have a column that it is increments but I do not know how I can define the length because I did it like this:
$table->increments('section_id', 100);
It did not work at all, it added just 10...
So I wonder how can I fix it? Thanks

How to filter out stuff from one column that is listed in another one?

I'm attempting to filter one column from another and the formula worked at first. Then I cleared the data and tried to reselect and now it doesn't work. What's the problem?
=FILTER(A2:A100,A2:A100=C2:C100)
you kinda need this:
=FILTER(A2:A, NOT(COUNTIF(E2:E, A2:A)))

Listagg function get me duplicate data

The question i want to ask is inside the attachment, please help me out for the solution
Solution I found using the SELECT DISTINCT

Is there a way to replace all nulls in a table at once?

If I have a table like this:
How might I replace all nulls with blanks at once?
I'd prefer a solution that dynamically accounts for column names, to account for more or less columns and differing column names. So Table.ReplaceValue(#"Changed Type",null,"",Replacer.ReplaceValue,{"Column1", "Column2", "Column3", "Column4"}) would not be what I'm after.
I'm thinking the solution would rely on somehow using something like{Table.ColumnNames(tablename here)} in place of {"Column1", "Column2", "Column3", "Column4"}but when I try that, I get an error:
I'm sure I just don't understand the proper syntax. I'll certainly appreciate your help.
I think I just figured it out. I needed to drop the brackets.
I changed...
Table.ReplaceValue(#"Added Custom",null,"",Replacer.ReplaceValue,{Table.ColumnNames(#"Changed Type")})
to...
Table.ReplaceValue(#"Added Custom",null,"",Replacer.ReplaceValue,Table.ColumnNames(#"Changed Type"))
and it seemed to work.

How can I clear all the records from a TDataSource?

I thought this would be simple but don't see a function that clears all records from the dataset of a TDataSource.
Any ideas?
There is no such function. You have to step through all records.
while ds.RecordCount>0 do
ds.delete;
try clear the DataSet with EmptyDataSet..
Example... ds.EmptyDataSet;

Resources