The Migrations section of the Realm Swift documentation actually shows how to remove two columns ( firstName and lastName ) and replace them with one new property (i.e. fullName ).
To remove columns from your Realm file, all you have to do is remove these properties from the model object and perform the migration.
If you want to save information in those columns, you can transfer this information to a new property inside the close of the transfer (as the documentation demonstrates). This is completely optional, and if you start the migration with an empty closure, the columns will simply be deleted and the data will be deleted.
source share