Event Tables Being Dropped When Adding New Registry with a new db schema #3983
Unanswered
TharinduNalan
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm encountering an issue where adding a new registry to an existing Marten DocumentStore configuration causes event tables to be dropped and recreated, resulting in data loss.
Steps to Reproduce
FreightShippingexample:After this initial run, the
events.mt_eventstable contains 5 event records.ClientRegistryis defined as:Expected Behavior
events.mt_eventsshould be preservedshipmentsschema should be preservedclientsschema and its tables should be createdActual Behavior
events.mt_eventstable is dropped and recreatedshipmentsschema tables are also affectedI'm new to MartenDB and not sure if there's any reason for this behavior, or if my setup is not correct. But as I understand it shouldn't delete any existing data. The data deletion happens on
ApplyAllConfiguredChangesToDatabaseAsync().Any guidance on the proper approach to handling schema evolution while preserving existing data would be greatly appreciated.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions