Josh
unread,Jul 29, 2012, 4:55:10 PM7/29/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Lobos Library
What would be the way to use a custom enum type in lobos migrations?
For example, here is the type:
CREATE TYPE order_status AS ENUM ('one', 'two', 'three');
Here is the migration:
(defmigration add-xyz-table
(up [] (create
(tbl :xyz
(order-status :status 100)
(money :price 100)
...
)))
(down [] (drop (table :xyz))))
It seems I can do something like:
(defn order-status [table name & options]
(apply column table name (data-type :order_status) options))
to have "order_status" available in migration, but this is just a
guess. What is the lobos expected way?
As a side question, can lobos be used to create a postgreSQL enum?
Thank you.