I am using MYSQL instead of Postgres for my database. For Postgres it’s simple we can create a type using enum and use it in the migration to allow the values in the enum, but MYSQL doesn’t support this. Now, If I want the enum in the migrations. How can I do that with MYSQL? Let’s say this is my migration.
create table(:user) do add(:role, :string) # 'owner', 'worker', 'manager', 'pending_approval' add(:business_id, :string, null: false, default: "") end
I only want to allow
owner, worker, manager, pending approvals for role field.