Sha256: 95d39b08e330d9fec6592f122dc9a7393c7168a92f0c04dd20784e84a08a3675
Contents?: true
Size: 456 Bytes
Versions: 54
Compression:
Stored size: 456 Bytes
Contents
# frozen_string_literal: true class CreateOrmResources < ActiveRecord::Migration[5.0] def options if ENV["VALKYRIE_ID_TYPE"] == "string" { id: :text, default: -> { '(uuid_generate_v4())::text' } } else { id: :uuid } end end def change create_table :orm_resources, **options do |t| t.jsonb :metadata, null: false, default: {} t.timestamps end add_index :orm_resources, :metadata, using: :gin end end
Version data entries
54 entries across 54 versions & 1 rubygems