Skip to content

Commit 65bfa5e

Browse files
committed
wip 2
1 parent 1139263 commit 65bfa5e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

activerecord/lib/active_record/connection_adapters/postgresql/schema_creation.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,7 @@ def add_column_options!(sql, options)
129129
if as = options[:as]
130130
stored = options[:stored]
131131

132-
if stored == false && database_version < 18_000
133-
raise ArgumentError, <<~MSG
134-
PostgreSQL versions before 18 do not support VIRTUAL (not persisted) generated columns.
135-
Specify 'stored: true' option for '#{options[:column].name}'
136-
MSG
137-
end
138-
139-
if stored.nil? && database_version < 18_000
132+
if (stored != true) && database_version < 18_000
140133
raise ArgumentError, <<~MSG
141134
PostgreSQL versions before 18 do not support VIRTUAL (not persisted) generated columns.
142135
Specify 'stored: true' option for '#{options[:column].name}'

0 commit comments

Comments
 (0)