You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# frozen_string_literal: trueclassAddStatusEnum < ActiveRecord::Migration[5.2]defupcreate_enum'status',['sick','on vacation','working from home']enddefdowndrop_enum'status'endend
Schema
Expected Schema
ActiveRecord::Schema.define(version: 2019_09_27_145140)do# ...# These are custom enum types that must be created before they can be used in the schema definitioncreate_enum"status",['sick','on vacation','working from home']end
Actual Schema
ActiveRecord::Schema.define(version: 2019_09_27_145140)do# ...# These are custom enum types that must be created before they can be used in the schema definitioncreate_enum"status",%w[sickonvacationworkingfromhome]end
This ☝️will lead to the enum being created with values ["sick", "on", "vacation", "working", "from", "home"]
The text was updated successfully, but these errors were encountered:
Hi 👋
I've been using
activerecord-pg_enum
for a few weeks now, it's a fantastic gem, thanks for writing it.Today I was adding a migration to create an enum which has values containing spaces, but the dumper doesn't appear to handle this correctly.
I've been taking a look at the codebase and would be happy to try and make this change, assuming it's deemed valid.
Steps to reproduce
Rails version: 5.2.2.1
Ruby version: 2.6.3
activerecord-pg_enum version: 1.0.2
Migration
Schema
Expected Schema
Actual Schema
This ☝️will lead to the enum being created with values
["sick", "on", "vacation", "working", "from", "home"]
The text was updated successfully, but these errors were encountered: