Sha256: a2471eaaf4ab3e2577e629299f2131b8b15a86a44af8d05bb171175b8e859a64

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

class <%= @migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
  def self.up
    enable_extension 'pgcrypto' unless extensions.include?('pgcrypto')
    create_table :resources, id: :uuid, force: true do |t|
      t.string   :name
      t.text     :description
      t.string   :resource_type # fungible_backed, fungible_soft, non_fungibe
      t.jsonb    :schema, default: {}
      t.timestamps
    end
  end

  def self.down
    drop_table :resources
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hws-resources-0.1.0 lib/generators/hws/resources/templates/migration.rb.erb