Sha256: 9a4ceab9a7dcaeea3c7572235f3ce4e729ec7b12039d4695e01ce78f56a5ec89
Contents?: true
Size: 478 Bytes
Versions: 4
Compression:
Stored size: 478 Bytes
Contents
class Create<%= migration_class_name %> < ActiveRecord::Migration def change create_table :<%= table_name %> do |t| t.string :to_state, null: false t.text :metadata<%= ", default: \"{}\"" unless mysql? %> t.integer :sort_key, null: false t.integer :<%= parent_id %>, null: false t.timestamps end add_index :<%= table_name %>, :<%= parent_id %> add_index :<%= table_name %>, [:sort_key, :<%= parent_id %>], unique: true end end
Version data entries
4 entries across 4 versions & 1 rubygems