Sha256: 0d2d5fe2e03068335e74f7da207193f3eda29a86e6b9905d2f2edf0722e38bf0

Contents?: true

Size: 484 Bytes

Versions: 7

Compression:

Stored size: 484 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

7 entries across 7 versions & 1 rubygems

Version Path
memento-0.3.7 generators/memento_migration/templates/migration.rb
memento-0.3.6 generators/memento_migration/templates/migration.rb
memento-0.3.5 generators/memento_migration/templates/migration.rb
memento-0.3.4 generators/memento_migration/templates/migration.rb
memento-0.3.3 generators/memento_migration/templates/migration.rb
memento-0.3.2 generators/memento_migration/templates/migration.rb
memento-0.3.1 generators/memento_migration/templates/migration.rb