Sha256: 236f4ba12896762601dece8e73d4a25776a596df138248294939b3dde02e4e3f

Contents?: true

Size: 432 Bytes

Versions: 23

Compression:

Stored size: 432 Bytes

Contents

class CreateVestalVersions < ActiveRecord::Migration
  def self.up
    create_table :versions do |t|
      t.belongs_to :versioned, :polymorphic => true
      t.text :changes
      t.integer :number
      t.datetime :created_at
    end

    change_table :versions do |t|
      t.index [:versioned_type, :versioned_id]
      t.index :number
      t.index :created_at
    end
  end

  def self.down
    drop_table :versions
  end
end

Version data entries

23 entries across 23 versions & 4 rubygems

Version Path
vestal_versions-0.5.0 generators/vestal_versions_migration/templates/migration.rb
vestal_versions-0.4.5 generators/vestal_versions_migration/templates/migration.rb
vestal_versions-0.4.4 generators/vestal_versions_migration/templates/migration.rb