Sha256: 1f84336dfe534354d962696034baa97f5d8a08a876ec625563db5809a7c7d885
Contents?: true
Size: 390 Bytes
Versions: 7
Compression:
Stored size: 390 Bytes
Contents
class Create<%= klass.pluralize %> < ActiveRecord::Migration def change create_table :<%= table_name %> do |t| t.string :to_state t.text :metadata, default: "{}" t.integer :sort_key t.integer :<%= parent_id %> end add_index :<%= table_name %>, :<%= parent_id %> add_index :<%= table_name %>, [:sort_key, :<%= parent_id %>], unique: true end end
Version data entries
7 entries across 7 versions & 1 rubygems