4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/postgresql/check/schema_definitions.rb', line 4
def self.included(base)
if ActiveRecord::VERSION::STRING > '4.2'
ActiveRecord::ConnectionAdapters::PostgreSQL::Table.class_eval do
include Postgresql::Check::Table
end
ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition.class_eval do
include Postgresql::Check::TableDefinition
end
else
base::Table.class_eval do
include Postgresql::Check::Table
end
base::TableDefinition.class_eval do
include Postgresql::Check::TableDefinition
end
end
end
|