Module CouchRest::Model::Utils::Migrate
In: lib/couchrest/model/utils/migrate.rb

Handle CouchDB Design Document migrations.

Actual migrations are handled by the Design document, this serves as a utility to find all the CouchRest Model submodels and perform the migration on them.

Also contains some more advanced support for handling proxied models.

Examples of usage:

   # Ensure all models have been loaded (only Rails)
   CouchRest::Model::Utils::Migrate.load_all_models

   # Migrate all regular models (not proxied)
   CouchRest::Model::Utils::Migrate.all_models

   # Migrate all models and submodels of proxies
   CouchRest::Model::Utils::Migrate.all_models_and_proxies

Typically however you‘d want to run these methods from the rake tasks:

   $ rake couchrest:migrate_with_proxies

NOTE: This is an experimental feature that is not yet properly tested.

Methods

Public Instance methods

Go through each class that inherits from CouchRest::Model::Base and attempt to migrate the design documents.

Make an attempt at loading all the files in this Rails application‘s models directory.

Protected Instance methods

[Validate]