No, they are different. Debt consolidation involves combining two or more loans into one. If you consolidate your debt, you would have to make a single monthly payment instead of several payments.
Bankruptcy is a legal process which can provide you with relief when you aren’t able to repay your debts. But there are downsides, too. Bankruptcy can remain on your credit report for seven to ten years. During this period, you could find it difficult to get a loan or even a new job.