Skip to content

Create migration to add favorite_resources to user as jsonb #78

@MarchandMD

Description

@MarchandMD

Description

A clear and concise description of the issue.

While updating the users/:id show page, I wanted to list some other state about a User. This lead to wanting to expand the Users table. I didn't want to create many fields for this collection of details of a user, so a migration for a JSONB field is preferred. favorite_resources (language, frameworks, websites, articles) are going to be added. Limit the possible keys to these fields for now.

User Story

As a engineer
I want to add a migration to expand the Users table to include favorite_resources with restrictions on the permitted keys (langauge, frameworks, websites, articles)
So that a user is able to add/update these fields as they expand their profile

Engineering Checklist

  • create a migration for the users table
    • add favorite_resources as a jsonb field
    • run the migration
    • serialize the field in the Users model
    • restrict the keys to language, frameworks, websites and articles
    • specs

Acceptance Criteria

  • create a migration for the users table
    • add favorite_resources as a jsonb field
    • run the migration
    • serialize the field in the Users model
    • restrict the keys to language, frameworks, websites and articles
    • specs

Relevant Logs or Screenshots

Paste any logs, error messages, or screenshots here.

Additional Context

Any other information that might be relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions