I have a Mysql table defined as:
CREATE TABLE `Events` (
`entity` enum('CLN','TDS','TMS','VTMS') NOT NULL DEFAULT 'CLN',
`type` enum('INFO','STAT','WARN') NOT NULL)
How can I find what the ENUM-type column definition is in Ruby?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I thought there would be a simpler way to find out the ENUM-type column definition but here’s my solution:
— select(“show create table Events”)
-> 0.0004s
=> [“CLN”, “TDS”, “TMS”, “VTMS”]