Sha256: af978acce974209fd2837f1eb19b36706d58f28bcb3b9fef93d392b20fb195ea

Contents?: true

Size: 476 Bytes

Versions: 4

Compression:

Stored size: 476 Bytes

Contents

class MementoMigration < ActiveRecord::Migration

  def self.up
    create_table :memento_sessions do |t|
      t.references :user
      t.timestamps
    end

    create_table :memento_states do |t|
      t.string :action_type
      t.binary :record_data, :limit => 16777215
      t.references :record, :polymorphic => true
      t.references :session
      t.timestamps
    end
  end

  def self.down
    drop_table :memento_states
    drop_table :memento_sessions
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
memento-0.4.3 generators/memento_migration/templates/migration.rb
memento-0.4.2 generators/memento_migration/templates/migration.rb
memento-0.4.1 generators/memento_migration/templates/migration.rb
memento-0.4.0 generators/memento_migration/templates/migration.rb