Friday 8 November 2019

Change Id to uuid in rails postgresql


Before run this command if you have migration file in migrate folder please take backup all migration file then run this command and migrate it will work.

rails g migration enable_uuid_extension
endclass EnableUuidExtension < ActiveRecord::Migration
  def change
     enable_extension "uuid-ossp"
    enable_extension "pgcrypto"  
   end 
end

No comments:

Post a Comment

Revert last commit or second last and more....

 Git revert commit_id -m 1 this command willl revert last commit  Git revert commit_id -m 2 this command will revert second commit with same...