-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Right now in extension approach 1 and 2 we can only add to existing schema via
add_to_schema do
# schema declarations to add go here
endand then we use it like this in models.
schema "source" do
original fields & relations
extensions
endWhile this is simple, it does not allow us to remove/modify existing relations.
What we can try and do is use something like this in models:
extended_schema "source" do
original fields & relations
endand then provide two methods:
add_to_schema do
end
remove_from_schema do
endusing this we can rewrite the schema call.
see initial implementation here and diff
This could allow us to add/remove fields to schema, however we want to be sure before implementing this whether we want to include this feature as it may cause things to break if used with abandon, i.e. compile time pattern matching fails or essential fields used throughout the system being removed.
Metadata
Metadata
Assignees
Labels
No labels