require postgresql 9.3 or newer

Change-Id: Ia79b94b3d0a6f6407461ca0e5712b306ca0906e8
Reviewed-on: https://gerrit.instructure.com/85384
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2016-07-14 16:53:27 -06:00
parent 4054168514
commit ff65415655
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ module CanvasRails
connection_parameters[:host] = host
@connection = PGconn.connect(connection_parameters)
raise "Canvas requires PostgreSQL 9.3 or newer" unless postgresql_version >= 90300
if CANVAS_RAILS4_0
ActiveRecord::ConnectionAdapters::PostgreSQLColumn.money_precision = (postgresql_version >= 80300) ? 19 : 10
else