Migrating Bubble Option Sets: Preserve Statuses and Business Rules
An order still says “Approved” after a migration. That looks reassuring until the new app allows it to be edited, places it in the wrong queue, or sends the wrong notification. The label survived; the behavior did not.
For a production Bubble app, option sets need their own migration inventory. Record what each option means, where it is used, and which actions it permits before choosing a replacement in code. This guide gives you a mapping method, a small worked example, and checks for proving the replacement behaves correctly.
What you are moving, beyond dropdown labels
Bubble’s option-set documentation describes static application data, rather than ordinary database records. Options can carry attributes, including references to another option set. The Display attribute does not have to be unique. Option-set data is delivered with the app, so it is not a place for secrets. Changes to the live version require deployment.
Those characteristics matter when selecting the target design. A country list, an order lifecycle, and a set of account roles may all look like dropdowns, but they have different change controls and consequences. Do not convert every list into the same database structure merely because the Bubble editor presents them similarly.
Start with one business-critical option set. Trace its use through saved records, page conditions, searches, backend workflows, integration payloads, and reports. The broader Bubble data migration checklist covers moving records and relationships; this inventory focuses on the definitions that give those records meaning.
Build a mapping that survives a label change
Treat option definitions and saved records as separate migration inputs. Capture the definitions from the intended app version, then verify how exported records and API inputs refer to those options.
Use a versioned mapping sheet with one row per source option. Capture the source set and an unambiguous source identity, the current display label, attributes and their types, references to other options, the proposed target key, and each consumer that depends on it. Also record defaults, allowed empty values, display order, and whether the value can still be selected for new records.
Verify the representation actually present in your export, API responses, and workflow inputs. Do not assume those surfaces all identify an option in the same way. If an export contains only labels and two source options share a label, stop automatic mapping for those rows. Resolve the ambiguity against the source app or another verified discriminator; guessing creates valid-looking but incorrect data.
Choose target keys for stability, not appearance. In a demonstration order system, a key such as review_required can remain unchanged when the visible label changes from “Needs review” to “Review needed.” Keep a separate display label. If order matters, define an explicit sort position rather than relying on alphabetic sorting or incidental import order.
Treat references between option sets as relationships. Map the referenced options as well, and check for missing targets before importing dependent records. If an attribute points to an image or file, preserve the intended reference and accessibility separately; the label mapping alone does not move the asset.
Choose code constants, a database enum, or a lookup table
Use code constants for genuinely static presentation choices that can change with a release. Keep server-side consumers aligned with the same vocabulary. A TypeScript type is useful for developers, but incoming requests still need runtime validation.
A database enum can fit a small, stable vocabulary when database-level restriction is useful. PostgreSQL enums have a defined order and case-sensitive labels. Existing values cannot simply be removed or reordered without recreating the type. Its enum documentation explains these constraints, which deserve attention before choosing an enum for a frequently changing business catalogue.
A lookup table is often more practical when options need editable labels, several attributes, relationships, or retirement without losing historical meaning. Give each entry a stable key and an explicit active-for-new-selection flag. Reference entries from business records rather than copying labels everywhere. Decide who can change the catalogue and how those changes are reviewed.
You can combine these approaches. An interface may use a generated list of allowed values while the database remains authoritative. What matters is an intentional ownership model: where a new option is introduced, which systems must understand it, and how incompatible versions are prevented from writing it too early.
Worked example: an order status with two kinds of “Closed”
The following is a demonstration, not a customer case. Suppose a Bubble app distinguishes fulfilled orders from cancelled orders, but both display “Closed.” The fulfilled option permits a receipt download; the cancelled option permits a cancellation explanation. A label-only conversion would erase that distinction.
Map the fulfilled source option to fulfilled and the cancelled source option to cancelled. Both may continue to display “Closed” if that is the intended interface, while reports and actions use the stable keys. Give both a terminal-state attribute, but keep their business outcomes separate. Record the verified source identities in the mapping rather than inventing a source ID format.
A compact acceptance record for this example is: source fulfilled option → target fulfilled → label Closed → receipt available; source cancelled option → target cancelled → label Closed → cancellation explanation available. Transition check: review_required → approved is accepted for an authorized approver; fulfilled → approved is rejected. Replace these demonstration rules with the rules verified in your application.
Now add review_required, which may transition to approved or cancelled. Describe the transition rules separately from the list of valid statuses. A valid value does not prove a valid change: changing fulfilled back to approved might be forbidden even though both values exist.
Finally, define who may request each transition and what must happen with it. If approval creates an external action, preserve the existing safeguards against repeating that action. For access checks, use the separate privacy-rule migration guide; a status name or hidden button does not establish authorization.
Make blank, unknown, and retired values explicit
Do not silently replace an unmapped value with the first option or a convenient default. Separate three cases: an intentionally empty field, a known historical option that is no longer selectable, and a value the migration cannot explain.
For each case, agree on an outcome before the import. An allowed empty field may remain empty. A retired option may remain attached to historical records while disappearing from new-entry controls. An unknown value should be quarantined for investigation or rejected according to the agreed import policy, with enough source context to resolve it.
Enforce the intended rules at the appropriate boundaries. Validate writes on the server and use database constraints where they fit. PostgreSQL’s constraints documentation notes that a CHECK can pass when its expression evaluates to null; a required field therefore needs an explicit nullability rule. A foreign key can establish that a referenced option exists, but application logic must still determine whether a user may select it now.
Test behavior, not just record counts
Use a small fixture pack before the full migration. For the demonstration order system, include at least these cases:
Two source options with the same Display label map to different target keys and preserve their distinct permitted actions.
Changing a visible label leaves saved relationships and business behavior unchanged.
An approved order appears in the correct queue, and its allowed next transitions match the agreed rules.
A retired status remains readable on an old order but cannot be selected for a new one.
An intentionally empty value stays empty; an unmapped value produces an explicit exception rather than a default.
A request with a valid status but an unauthorized or invalid transition is rejected on the server.
A changed display order and an option-to-option attribute produce the expected interface and calculations.
Then reconcile the full dataset by source identity and target key, not just by displayed label. Compare counts for each mapped value, total references, empty fields, retired values, and unresolved exceptions. Investigate differences against the mapping version used for that run. Matching totals alone can conceal a swap between two categories.
Run representative workflows as well: open an old record, edit an allowed field, submit a transition, filter a report, and inspect the resulting integration payload. Keep expected results alongside the fixtures so another engineer can repeat the check without relying on a screenshot of a dropdown.
Control option changes during cutover
Freeze or explicitly version the option definitions while the final migration is being prepared. If someone changes a label, attribute, or transition in Bubble during that window, decide whether it requires a new mapping and rerun. Record the decision rather than assuming the database export includes every relevant application change.
For a staged rollout, check whether both application versions can understand every value either one can write. Introduce compatible readers before enabling new values, or gate those writes until the old path has been retired. Test rollback against the values created after cutover. A new key that the old application cannot interpret is a real rollback limitation.
The migration cutover plan should identify the owner of catalogue changes, the final mapping version, unresolved exceptions, and the decision point for enabling writes. Keep the old-to-new mapping with the handover materials so later support work can explain historical records.
What to bring to a migration review
Bring the critical option-set definitions, a few representative records, and the workflows that depend on them. Include duplicate display labels, retired choices, empty values, and any option attributes that drive calculations or access decisions. These are useful inputs even if you decide to keep the application on Bubble.
Bubble to Code’s published migration process includes reviewing workflows, data, dependencies, testing, and handover. An option-set behavior map fits that scope: it makes a small-looking configuration change visible before it becomes a production discrepancy. Review the migration process or request a migration review to discuss which definitions need code, database, and workflow changes in your app.
Frequently asked questions
Can I replace every Bubble option set with an enum?
Not safely by default. A stable list with no editable metadata may suit an enum. A catalogue with changing attributes, relationships, or retired entries may suit a lookup table. Choose based on change patterns and behavior, not the number of labels.
Is the Display label a safe migration key?
Only after you have verified that it uniquely identifies the intended source option in every relevant input. Prefer a verified identity mapping and separate target keys from labels. Ambiguous source rows need resolution before automated conversion.
Do I need to rewrite every workflow that uses an option set?
Inventory each dependency and implement or preserve its required behavior in the destination. Some uses only render a label; others control transitions, calculations, or side effects. Testing those paths is more useful than assuming that changing the stored field completes the migration.
Sources
- 01Bubble’s option-set documentation · Bubble Docs
- 02enum documentation · postgresql.org
- 03PostgreSQL’s constraints documentation · postgresql.org
Keep reading
Bubble to Code is an independent service. Not affiliated with, endorsed by, or sponsored by Bubble Group, Inc.
