Need to duplicate migration_defaults if multiple resources uses the same table
I have a resource called
User
it has this postgres
configuration:
I have a migration file for that specific resource with correctly created the roles
field with the default value:
I also have another resource that uses the same table called Bidder
.
it has this postgres
configuration:
If I try to create a migration file for that resource, it will alter the user table changing the role
default to nil
.
Can I stop it from doing it without having to duplicate that code in both resources?2 Replies
You could do something like
migration_ignore_attributes: [:foo]
on one of the resources where :foo
is the attribute you don’t want it to mess with
If one of the resources is a strict subset of the other, you can also say migrate? false
to only generate migrations based on the main resource.Thank you, amazing how Ash always have a solution already in place hahaha