How to rollback a specific migration

0 votes
I have the following migration file db\migrate\20100905201547_create_blocks.rb

How can I specifically rollback that migration file?
Jul 24, 2020 in Java-Script by kartik
• 37,520 points
3,135 views

1 answer to this question.

0 votes

Hello @kartik,

Try this:

rake db:migrate:down VERSION=20100905201547

will roll back the specific file.

To find the version of all migrations, you can use this command:

rake db:migrate:status

Or, simply the prefix of the migration's file name is the version you need to rollback.

Hope this is helpfull!!

Thank You!!

answered Jul 24, 2020 by Niroj
• 82,840 points

Related Questions In Java-Script

0 votes
1 answer

How to check if a specific key is present in a hash or not?

Hello @kartik, While Hash#has_key? gets the job done, as it has ...READ MORE

answered Jul 24, 2020 in Java-Script by Niroj
• 82,840 points
3,354 views
0 votes
1 answer

How to clone a JavaScript object?

Hello, You can clone an object and remove ...READ MORE

answered Apr 2, 2020 in Java-Script by Niroj
• 82,840 points
950 views
0 votes
1 answer

How to print a circular structure in a JSON-like format?

Hello, You can use util.inspect(object) in node.js. It automatically ...READ MORE

answered Apr 24, 2020 in Java-Script by Niroj
• 82,840 points
2,831 views
0 votes
1 answer

How do I turn a string to a json in Node.js?

Hello Kartik, Use the JSON function  JSON.parse(theString) ...READ MORE

answered Apr 24, 2020 in Java-Script by Niroj
• 82,840 points
992 views
0 votes
1 answer

How can I specify a local gem in my Gemfile?

Hello @kartik, In order to use local gem ...READ MORE

answered Jul 24, 2020 in Java-Script by Niroj
• 82,840 points
3,701 views
0 votes
1 answer

How to convert a ruby hash object to JSON?

Hello @kartik, You can also use JSON.generate: require 'json' JSON.generate({ foo: ...READ MORE

answered Jul 24, 2020 in Java-Script by Niroj
• 82,840 points
12,735 views
0 votes
1 answer

Error:bundle install fails with SSL certificate verification error

Hello @kartik, Replace the ssl gem source with ...READ MORE

answered Jul 25, 2020 in Java-Script by Niroj
• 82,840 points
1,829 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
23,080 views
+1 vote
1 answer

How can we send message multiple time to a specific person or group in whatsapp using loop?

Hii @kartik,  This is simple task to send single ...READ MORE

answered Feb 28, 2020 in Java-Script by Niroj
• 82,840 points
18,741 views
0 votes
1 answer

How to Get values from a specific user - queryset in Django?

Hello @kartik, You can get the list of Users ...READ MORE

answered May 28, 2020 in Java-Script by Niroj
• 82,840 points
10,960 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP