Rails DB Migration – How To Drop a Table?

You won’t always be able to simply generate the migration to already have the code you want. You can create an empty migration and then populate it with the code you need. You can find information about how to accomplish different tasks in a migration here: http://api.rubyonrails.org/classes/ActiveRecord/Migration.html More specifically, you can see how to drop … Read more

Want to upgrade project from Angular v5 to Angular v6

Upgrade from Angular v6 to Angular v7 Version 7 of Angular has been released Official Angular blog link. Visit official angular update guide https://update.angular.io for detailed information. These steps will work for basic angular 6 apps using Angular Material. ng update @angular/cli ng update @angular/core ng update @angular/material Upgrade from Angular v5 to Angular v6 … Read more

Migrate from Oracle to MySQL

Oracle does not supply an out-of-the-box unload utility. Keep in mind without comprehensive info about your environment (oracle version? server platform? how much data? what datatypes?) everything here is YMMV and you would want to give it a go on your system for performance and timing. My points 1-3 are just generic data movement ideas. … Read more

Migration from Struts 1 to Struts 2

S1 with S2 it will overkill. Both frameworks are complicated, so the maintenance costs increase twice or more time. So, the strategy is to migrate completely to S2. Both frameworks are implemented MVC pattern. Divide the application on three parts that should migrate separately: Model, Controller, and View. The order is not important, but logically … Read more

How can I rename a database column in a Ruby on Rails migration?

rename_column :table, :old_column, :new_column You’ll probably want to create a separate migration to do this. (Rename FixColumnName as you will.): script/generate migration FixColumnName # creates db/migrate/xxxxxxxxxx_fix_column_name.rb Then edit the migration to do your will: # db/migrate/xxxxxxxxxx_fix_column_name.rb class FixColumnName < ActiveRecord::Migration def self.up rename_column :table_name, :old_column, :new_column end def self.down # rename back if you need … Read more