Sha256: e5d34f9363c7e152a7f462e54ac298a77ae80e1daaca10c51e088fcffd82a1fe
Contents?: true
Size: 528 Bytes
Versions: 35
Compression:
Stored size: 528 Bytes
Contents
# frozen_string_literal: true # This migration comes from valkyrie_engine (originally 20161007101725) 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
35 entries across 21 versions & 1 rubygems