Module: RubyCms::MigrationHelpers
- Defined in:
- lib/ruby_cms/migration_helpers.rb
Overview
Shared helpers for CMS migrations (json on SQLite, jsonb on PostgreSQL).
Class Method Summary collapse
Class Method Details
.json_column(table, name, **options) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/ruby_cms/migration_helpers.rb', line 8 def json_column(table, name, **) if table.respond_to?(:jsonb) table.jsonb(name, **) else table.json(name, **) end end |