Module: ChronoModel
- Defined in:
- lib/chrono_model.rb,
lib/chrono_model/chrono.rb,
lib/chrono_model/adapter.rb,
lib/chrono_model/railtie.rb,
lib/chrono_model/version.rb,
lib/chrono_model/time_gate.rb,
lib/chrono_model/utilities.rb,
lib/chrono_model/adapter/ddl.rb,
lib/chrono_model/conversions.rb,
lib/chrono_model/time_machine.rb,
lib/chrono_model/adapter/indexes.rb,
lib/chrono_model/adapter/upgrade.rb,
lib/chrono_model/patches/batches.rb,
lib/chrono_model/patches/relation.rb,
lib/chrono_model/patches/join_node.rb,
lib/chrono_model/patches/preloader.rb,
lib/chrono_model/adapter/migrations.rb,
lib/chrono_model/patches/db_console.rb,
lib/chrono_model/patches/association.rb,
lib/chrono_model/time_machine/timeline.rb,
lib/chrono_model/time_machine/time_query.rb,
lib/chrono_model/patches/as_of_time_holder.rb,
lib/chrono_model/time_machine/history_model.rb,
lib/chrono_model/patches/as_of_time_relation.rb,
lib/chrono_model/adapter/migrations_modules/stable.rb
Defined Under Namespace
Modules: Chrono, Conversions, Patches, TimeGate, TimeMachine, Utilities Classes: Adapter, Error, Railtie
Constant Summary collapse
- VERSION =
'4.0.0'
Class Method Summary collapse
-
.history_models ⇒ Object
Returns an Hash keyed by table name of ChronoModels.
-
.upgrade! ⇒ Object
Performs structure upgrade.
Class Method Details
.history_models ⇒ Object
Returns an Hash keyed by table name of ChronoModels. Computed upon inclusion of the TimeMachine
module.
35 36 37 |
# File 'lib/chrono_model.rb', line 35 def self.history_models @history_models ||= {} end |
.upgrade! ⇒ Object
Performs structure upgrade.
22 23 24 25 26 27 28 29 30 |
# File 'lib/chrono_model.rb', line 22 def self.upgrade! connection = ActiveRecord::Base.connection unless connection.is_a?(ChronoModel::Adapter) raise ChronoModel::Error, 'This database connection is not a ChronoModel::Adapter' end connection.chrono_upgrade! end |