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
622 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,760 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,760 points
868 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,760 points
108 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,760 points
886 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,760 points
193 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,760 points
740 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,760 points
2,990 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 24, 2020 in Java-Script by Niroj
• 82,760 points
440 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,760 points
7,900 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,760 points
2,284 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,760 points
2,918 views