Rails: Remove CKEditor along with adding a new migration to drop it

457 views Asked by At

i need to remove 'ckeditor gem' and replace it with 'trumbowyg_rails gem' Ckeditor is properly implemented in all the pages also the migration is done for create_table "ckeditor_assets" how do i drop this migration and clean the rails app before adding trumbowyg_rails gem?

1

There are 1 answers

1
DroidNoob On

To rollback the migration that was done previously you can use rails db:rollback. Remove gem using gem uninstall ckeditor

EDIT:

To delete using migration

rails g migration deleteTableTableName

Then open the file and

def up
    drop_table :table_name
end

and then

rails db:migrate

I have not done this(I prefer rollback) but this should work.