chronomodel
chronomodel copied to clipboard
Temporal PostgreSQL (9.4+) system with "flashback" framework for ActiveRecord (7.0+)
OK, just now I figured out the solution to my problem: Insufficient database permissions for the user on production. I had to ``` grant usage on schema history to "my_database_user";...
Awesome gem! Is it possible to do a model.save(or create) while setting validity range (validity: (from..to))? I guess what I'm trying to ask is that it seems that chronomodel is...
Hi, We're using Chronomodel for two purpose: - versioning records to track user changes - track the record version when it's referenced outside our application (through URLs) We can currently...
``` (byebug) Activity.count 193 (byebug) Activity.history.count 1632 (byebug) Activity.find_each(batch_size: 10).count 193 (byebug) Activity.history.find_each(batch_size: 10).count 10 ```
After Rails 6.0, chronomodel uses `hid` to search into relations when the historical object is associated without passing from the object itself ``` Country::History.find(france.history.last.id).attributes.fetch('id') => 1 Country::History.find(france.history.last.id).cities.to_sql => "SELECT \"cities\".*...
This rarely presents a problem. However, if you're writing a reduced test case, keep in mind that the minimum supported number of attributes in a table is 2 How to...
Probably this behavior is expected, but it is surprising and may should be documented Let's say that I have an object that has been modified multiple times: ``` my_object.as_of(1.month.ago) ==...
Rails 7.1 will introduce `.with` to make CTE queries easily There are no specs in Chronomodel that ensures that this works, we should add one Database structure is here: https://github.com/ifad/chronomodel/blob/master/spec/support/time_machine/structure.rb...
It is not clear to me what is the correct behavior, but it is worth to mention the following: ```rb Vendor.last.history.last.model_name.name "Vendor::History" Vendor.history.last.to_gid # Vendor.as_of(1.day.ago).last.model_name.name "Vendor" Vendor.as_of(1.day.ago).last.to_gid # ```