-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
Description
Suppose that you start setting up Gioco with --points
and then you perceive that you will gonna need also --types
. Today there is no easy way to migrate, first you will gonna have to completely uninstall Gioco, losing all your badges and data, and then set it up again now with the both optionals.
The best solution would be a method that deal with the existent data and files that was generated. Not only to add option but also to remove.
The uninstall order of Gioco, if configured with only --points
optional, would be:
- Remove rake file gioco.rake
- Remove configuration file gioco.rb (config/initializers/gioco.rb)
- Remove db/gioco folder and all files inside it.
- Remove the similar line of the db/seeds.rb: require "#{Rails.root}/db/gioco/db.rb"
- Remove the following models: Badge, Level
- Remove migrations related with gioco! Including add_points_to_*(YOUR RESOURCE).rb
- Remove the following methods of your RESOURCE model: change_points and next_badge?
- Remove all relations involving badge, level in your RESOURCE model
- Access your database of all environments, drop the Level and Badge table
- Also drop the Points column of your RESOURCE table. if you do this using migrations don't forget of delete this migration before keep working.