ActiveRecordColumnTypes - Create a 'Mixed' option

Open
#2,369 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
tooling

Research direction

Start with manual/compiler_activerecordcolumns.md, which describes the ActiveRecordColumnTypes options, then locate the implementation and tests for those options. Done means adding a mixed or untyped-only option where non-nil fields remain untyped and nilable fields receive persisted-mode typing.

Written by the indexing model from the issue text.

Description

enhancement

Referencing this page.

I'm wondering if we could create a new mixed option that is between nilable and untyped. If the only reason we mark columns as 'untyped' is non-nil fields might be nilable before save, there's no actual reason that truly nilable columns should be untyped.

I'm proposing a ActiveRecordColumnTypes called mixed:

  • Non-nil fields continue to be untyped
  • Nilable fields get typed consistently with persisted mode.

Another possible name might be untyped-only

Dominant language
Ruby
Stars
873
Forks
164
Avg merge
4d 27m
Merged PRs (30d)
9

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/tapioca

All issues in Shopify/tapioca

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.