BG Database (inMemory database | Excel/Google Sheets syncing | CodeGen | Save/Load support)

enumByte and enumShort fields are still available

  1. For new fields, select appropriate enum field type in “Add field to [MetaName]” dialog
    Selecting enum type for new fields

8240025--1077408--79.png

  1. If you want to migrate existing enum field to new enum type without losing existing data- please follow the guide below.
    The guide is written for enum->enumByte migration and it can also be used for other types as well

The guide for changing enum underlying type starts here:
2.1) Backup your database just in case
2.2) Locate your enum in C# source files and create a copy with target enum type (in our case it’s byte).
Change a copy’s name by appending “Temp” postfix
enum type copy

8240025--1077411--80.png

2.3) Locate your enum field under “Configuration” tab and open “Change field type” dialog
Change field type dialog

8240025--1077414--81.png

2.4) Select enumByte as a new field type and set enum type name to your temp copy enum.
Click on “Change field type” button and save database.
change field type parameters

8240025--1077417--82.png

2.5) Switch back to your C# source file and change your enum underlying type to the target type (in our case it’s byte type)
changing enum underlying type

8240025--1077420--83.png

The guide is continuted in the next message…