lobos
lobos copied to clipboard
Add example of adding/removing column to existing table
Documentation should have examples of how to alter table add/remove column. Currently that is not too clear.
Took me a bit of playing around at first but here is a working example:
(defmigration add-data-to-videos
(up []
(alter :add
(table :videos
(int :duration)
(double :frame_rate))))
(down []
(alter :drop
(table :videos
(column :duration)
(column :frame_rate)))))
Agreed. Thanks for your input, it helped get me up and running.
Had to google for this. Agree that an example like this in the docs would be helpful.