I want to set up a rake task to fill my CouchDB with fixtures data and have to get rid of the data in the database first. A good example for the whole procedure using MySQL can be found here. This examples contains the following part to delete the data of the model in the MySQL database:
# the list of models (pluralized) you want to import, in order
models = ['Cities','Neighborhoods','Shops','Reviews']
# truncate existing tables
models.reverse.each { |model| ActiveRecord::Base.connection.execute("truncate table #{model.underscore}") }
What would be the equivalent for CouchDB? Do I have to take a complete different approach as this concept that is set up for relational databases cannot be applied to document-orientated databases?
Many thanks in advance!