struct DynFork::Migration::Monitor

Overview

Monitoring and update the database state for the application.

Defined in:

dynfork/migration.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(database_name : String) #

[View source]

Instance Method Detail

def migrat : Nil #

Run migration process.

  1. Update the state of Models in the super collection.

2) Add models states to the super collection if missing.
3) Check the changes in the models and (if necessary) apply to the database.
4) Delete data for non-existent Models from a super collection and delete collections associated with those Models.

[View source]