Possibility to "Extend" Tailor blueprints?

Got a question. Is it possible to “Extend” blueprints? Say, for instance, I got a blueprint called “Services” and I want to add a field, but I don’t want to edit the original blueprint file.

Could I do the following?

  • Create a new blueprint with the same UUID and Handle
  • Add the field that I need to add there
  • Migrate and not have conflicts

It is not currently possible, although this is an interesting idea.

The load order would not be predictable to make identical blueprint files merge like this. For example, there is no way to know which name will be used for these files:

# blueprint1.yaml
uuid: ae2d2c25-3a0e-4765-8b36-d1666fc0e31f
handle: Fields\SocialLinks
name: Wiki Article

# blueprint2.yaml
uuid: ae2d2c25-3a0e-4765-8b36-d1666fc0e31f
handle: Fields\SocialLinks
name: Blog Article

Assuming this would be controlled by having a base blueprint defining all the fields and an extended blueprint only defining the newly introduced elements:

# blueprint1.yaml
uuid: ae2d2c25-3a0e-4765-8b36-d1666fc0e31f
handle: Fields\SocialLinks
name: Blog Article
type: structure
structure:
    maxDepth: 1

fields:
    # [... base fields ..]


# blueprint2.yaml
uuid: ae2d2c25-3a0e-4765-8b36-d1666fc0e31f
handle: Fields\SocialLinks
fields:
    # [... extended fields ..]

In this example, Blueprint 2 extends Blueprint 1.

1 Like

That’s what I was planning on doing. I figured there would be some caveat to this.

The end goal would be to just pile fields on top of the ones we have now so that the original structure stays the same. Since it’s not predictable, I don’t think I would do it.

Also, the idea behind this would be similar to applying migrations using a plugin or Laravel’s existing migration techniques. Basically, you’re working on something, and decide that you need another database entry, so you extend it with a migration and add that field.

Thanks again @daftspunky