[erlang-questions] Add a field to a record

lloyd@REDACTED lloyd@REDACTED
Fri Sep 18 00:16:04 CEST 2015


Hello,

I understand that it would be better to use maps if you anticipate adding fields to a record.

But suppose you didn't anticipate and you've been merrily adding data to your db when you discover--- oops! I need another field.

e.g. You have: 
       -record anything, {
            field1,
            field2
          }

      and you discover that you really need:
       -record anything, {
            field1,
            new_field,
            field2
          }

Is there a cunning trick or technique to make the change without losing data?

Thanks,

LRP
              

*********************************************
My books:

THE GOSPEL OF ASHES
http://thegospelofashes.com

Strength is not enough. Do they have the courage 
and the cunning? Can they survive long enough to 
save the lives of millions?  

FREEIN' PANCHO
http://freeinpancho.com

A community of misfits help a troubled boy find his way 

AYA TAKEO
http://ayatakeo.com

Star-crossed love, war and power in an alternative 
universe

Available through Amazon or by request from your 
favorite bookstore


**********************************************





More information about the erlang-questions mailing list