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
- VALIDITY_TSRANGE_PRECISION =
ChronoModel uses default timestamp precision (p=6) for tsrange columns. PostgreSQL timestamp precision can range from 0 to 6 fractional digits, where 6 provides microsecond resolution (1 microsecond = 10^-6 seconds).
Rational(1, 10**6)
- VERSION =
'6.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.
40 41 42 |
# File 'lib/chrono_model.rb', line 40 def self.history_models @history_models ||= {} end |
.upgrade! ⇒ Object
Performs structure upgrade.
27 28 29 30 31 32 33 34 35 |
# File 'lib/chrono_model.rb', line 27 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 |