I would like to create a new table (to store the graph for vote delegation). Should I create a migration file similar to db/migrate/20120311170118_create_users.rb manually ? Or is it enough to update the == Schema Information at the end of the model file ? I naively tried that and run rake db:migrate but it did not work
No, you need to create migrate file and run it with db:migrate (see ActiveRecord docs )
Note that if you are developing a plugin, discourse provides a PluginStore to help you avoid migrations, since undoing then when the plugin gets uinstalled is a open problem.
PluginStore API - get row by attribute
Thanks, I’m glad I did not miss something
cool. Is there a plugin I could read to see how it’s used ? I found something on rubydoc.
Canned replies is recent and does it very clearly:
OK, thanks… I see …