chronomodel
chronomodel copied to clipboard
Temporal PostgreSQL (9.4+) system with "flashback" framework for ActiveRecord (7.0+)
```rb add_foreign_key :countries, :regions ``` ``` == 20220724104350 AddRegionFkConstraints: migrating =========================== -- add_foreign_key(:countries, :regions) rails aborted! StandardError: An error has occurred, this and all later migrations canceled: PG::WrongObjectType: ERROR: "countries"...
Ruby: 3.0 Rails: 7.0 ChronoModel: master branch ### migration ```rb enable_extension :btree_gist create_table :countries, temporal: true do |t| t.string :name end create_table :cities, temporal: true do |t| t.references :country t.string...
Found while trying to use `db:seed:replant` The problem is that `db:truncate_all` does not look into `temporal` and `history` schemas, so it does not find tables that should be trucated. It...
There are a lot of changes between v1.2.2 and master back from 2019, I don't know if there is a breaking one and we should bump the major Please advise...
``` ActiveRecord::Tasks::DatabaseNotSupported - Rake tasks not supported by 'chronomodel' adapter: ``` rails/rails#34788
The previous check didn't work properly because `data_source_sql` (which `data_source_exists?` uses internally) only qualifies the table_name to the current schema if a fully qualified name isn't passed. This could be...
I still need to write specs for this, but it changes how `options[:temporal]` is handled so that if you don't pass anything explicit it'll work fine (rather than right now,...
Overriding of ActiveRecord method "quote_column_name" to manage multiple column names. When the project integrate the gem "composite-primary-keys" [1], the returned primary key is an array. (refs #13) [1] https://github.com/composite-primary-keys/composite_primary_keys
When a record has `after_save` hooks (or rails built-ins such as the counter cache) that update another object, and there are parallel updates that will affect the same object, there...