Skip to content

[Logic] Implement project data migration pattern for contract upgrades #42

Description

@AbelOsaretin

Description

If the ProjectData struct needs to be extended (e.g., adding new fields), there is no migration pattern. Existing projects would not have the new fields, causing inconsistencies.

Recommendation

  • Design a versioned storage pattern
  • Store a schema version in instance storage
  • Implement migration functions that update old data to new format
  • Add version checks in all data access functions

Severity

Medium — Critical for long-term maintainability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contractSmart contract logic and designenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions