Comments (9)
All public types were previously added to the main feature as well, even if they were not in DI or had no attribute. So to keep it compatible, this feature assignment was kept. But I haven't thought enough about the migrations.
from orchardcore.
It looks like we should keep the FeatureAttribute
on the migration type of the submodule
from orchardcore.
How is this different to #16223?
from orchardcore.
Do you have an easy way to reproduce the issue?
from orchardcore.
The problem is that the migration manager is not allowing a migration to have more than one feature. But after removing the FeatureAttribute
from migrations, they will always be assigned to the main feature of their parent module and afterwards to the more specific feature via DI. So they will have two features if more than one migration is contained in a assembly.
There are two solutions possible:
- The data migration manager can always just use the last feature for a migration. This will always be the right feature as long as migrations are added to a single startup only. But this will not be obvious for anyone looking at the migration manager and may break if we change something in future.
- We can introduce a way to force types to be assigned to a single feature only.
I tend to suggest the second option.
from orchardcore.
Just like this ?
public class MyMigration :DataMigration<MyFeatureStartup>
It has the advantage of introducing strong type-checking and not needing to log those strings anymore~
from orchardcore.
That would be the same as applying the FeatureAttribute
like before. We wanted to avoid having to do that manually each time. I think we can add something to the base interface IDataMigration
.
from orchardcore.
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).
This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.
from orchardcore.
But after removing the
FeatureAttribute
from migrations, they will always be assigned to the main feature of their parent module and afterwards to the more specific feature via DI.
Why is that the case? Shouldn't just the second happen?
from orchardcore.
Related Issues (20)
- Hard to implement a ContentCulturePicker in Liquid HOT 18
- TimeField , DateTimeField and DateField cannot be deserialised from Json HOT 10
- Monthly community metrics report for 2024-05-01..2024-05-31 HOT 1
- Inconsistent UrlHelper behavior when two different endpoints have the same action name and use `[Admin("url template")]` HOT 4
- ConcurrencyException raised by ContentDefinitionManager HOT 10
- Infinite recursion when Content Picker Field references its own parent item with displaying shape override HOT 2
- `JsonDynamicValue' does not contain a definition for 'ToObject' HOT 7
- About enabling features in the setup recipe HOT 3
- Sanitization is causing some shortcodes to not render correctly in the MarkdownBody HOT 13
- Recipes Improvements HOT 19
- Add ExposedHeaders in CORS module HOT 5
- razor view does allow dynamic casting of property values using system.text.json HOT 21
- [LinkField] Add option to select the Target - _blank, _self, _parent and _top HOT 7
- Generalize options editor HOT 4
- LinkGenerator does not take in consederation the site prefix HOT 4
- OrchardCore_Media__AssetsPaths says it supports absolute paths but doesn't HOT 2
- Notification editor doesn't close when saving a draft HOT 13
- Saving workflow fails when using decimal comma (,) HOT 7
- Solution load fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orchardcore.