Skip to content

Commit

Permalink
[WIP] Remove TS Range override
Browse files Browse the repository at this point in the history
- TODO: Reasons
- TODO: Warn about the potential breaking change
- TODO: Bump major version

Close #267
  • Loading branch information
tagliala committed Feb 22, 2024
1 parent 5f05360 commit 545fbbf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 75 deletions.
1 change: 0 additions & 1 deletion .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions lib/chrono_model/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

require 'chrono_model/adapter/ddl'
require 'chrono_model/adapter/indexes'
require 'chrono_model/adapter/tsrange'
require 'chrono_model/adapter/upgrade'

module ChronoModel
Expand All @@ -19,7 +18,6 @@ class Adapter < ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
include ChronoModel::Adapter::Migrations
include ChronoModel::Adapter::DDL
include ChronoModel::Adapter::Indexes
include ChronoModel::Adapter::TSRange
include ChronoModel::Adapter::Upgrade

# The schema holding current data
Expand Down
72 changes: 0 additions & 72 deletions lib/chrono_model/adapter/tsrange.rb

This file was deleted.

4 changes: 4 additions & 0 deletions lib/chrono_model/time_machine/history_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,14 @@ def record # :nodoc:

def valid_from
validity.first
rescue RangeError
nil
end

def valid_to
validity.last
rescue RangeError
nil
end
alias as_of_time valid_to

Expand Down

0 comments on commit 545fbbf

Please sign in to comment.