Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Compose schema from types #53

Merged
merged 50 commits into from
Apr 14, 2024
Merged

feat: Compose schema from types #53

merged 50 commits into from
Apr 14, 2024

Conversation

codekeyz
Copy link
Owner

@codekeyz codekeyz commented Mar 3, 2024

Description

This enables auto schema generation from Entity Types. We can get rid of this boilerplate

void up(List<Schema> schemas) {
    final userSchema = Schema.create('users', (table) {
      return table
        ..id()
        ..string('firstname')
        ..string('lastname')
        ..integer('age')
        ..string('home_address');
    });

    schemas.add(userSchema);
}

and replace it with

void up(List<Schema> schemas) {
   schemas.add(UserSchema);
}

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@codekeyz codekeyz self-assigned this Mar 3, 2024
@codekeyz codekeyz added the enhancement New feature or request label Mar 3, 2024
@codekeyz
Copy link
Owner Author

Finally, this big ass refactor has all tests passing, 🔥

@codekeyz codekeyz merged commit b5d0516 into main Apr 14, 2024
2 checks passed
@codekeyz codekeyz deleted the feature/schema-from-types branch April 14, 2024 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant