353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
|
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 353
def prepare_column_options(column)
spec = {}
if limit = schema_limit(column)
spec[:limit] = limit
end
if precision = schema_precision(column)
spec[:precision] = precision
end
if scale = schema_scale(column)
spec[:scale] = scale
end
default = schema_default(column) if column.has_default?
spec[:default] = default unless default.nil?
spec[:null] = 'false' unless column.null
if collation = schema_collation(column)
spec[:collation] = collation
end
spec[:comment] = column..inspect if column..present?
spec
end
|