Skip to content

Do not create snapshots for resources with no attributes #571

Open
@nengru

Description

@nengru

Hey maybe a suggestion, for a neat fail-safe.

If you use ash.codegen directly after ash.gen.resource and than ash.migrate, you create an empty migration file and a snapshot to a table without a table.
If you than add attributes and use ash.codegen + ash.migrate it will fail on drop and alter in the migration file because there is no table.
Did it a few times on accident, fixed the migration file manually, not sure if its a feature or ash.codegen should just abort it because it has no attributes or relationships

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Someday

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions