Skip to content

Conversation

@cjbmartinez
Copy link
Collaborator

Description

Moved to using Integer Based Enums for the following table columns

  • Transcript#process_status
  • SiteAlert#level
  • UserRole#transcribing_role

Changes

  • Create a 3 step migration to be able to successfully update from string to integer based enum, While ensuring all existing records will still have their data intact
  • Minor updates on enum usage and raw SQL Queries using the stirng based enums


# TODO: Convert to integer-based enum
enum :level, { status: 'status', warning: 'warning', error: 'error' }
enum :level, { status: 0, warning: 1, error: 2 }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@neumerance
Copy link
Collaborator

PR looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants