Migrate classes Encoder and Entity