lib/ridgepole/default_limit.rb in ridgepole-2.0.0.beta vs lib/ridgepole/default_limit.rb in ridgepole-2.0.0.beta2

- old
+ new

@@ -1,18 +1,21 @@ # frozen_string_literal: true module Ridgepole class DefaultsLimit + DEFAULT_LIMIT_FOR_MYSQL = { + boolean: 1, + integer: 4, + bigint: 8, + float: 24, + string: 255, + text: 65_535, + binary: 65_535, + }.freeze + DEFAULTS_LIMITS = { - mysql2: { - boolean: 1, - integer: 4, - bigint: 8, - float: 24, - string: 255, - text: 65_535, - binary: 65_535, - }, + mysql2: DEFAULT_LIMIT_FOR_MYSQL, + trilogy: DEFAULT_LIMIT_FOR_MYSQL, }.freeze class << self def default_limit(column_type, options) defaults = DEFAULTS_LIMITS[adapter] || {}