Sha256: 30c5fb20d18bdc8696f822384865ab915f7b5043c7008d0b85d3a9fdaf41e0b5

Contents?: true

Size: 772 Bytes

Versions: 4

Compression:

Stored size: 772 Bytes

Contents

class CreateAlertMessage < ActiveRecord::Migration
  def self.up
    drop_table :inboxes

    create_table :inboxes do |t|
      t.integer :user_id
    end
    
    create_table :alert_messages do |t|
      t.string :label
      t.string :model_class
      t.integer :model_id
      t.string :alert_type
      t.text :old_value
      t.text :new_value
      t.integer :inbox_id
      t.boolean :read
      
      t.timestamps
    end
  end

  def self.down
    drop_table :alert_messages
    create_table :inboxes do |t|
       t.string :label
       t.string :object_class
       t.integer :object_id
       t.string :alert_type
       t.string :old_value
       t.string :new_value
       t.text :content
       t.integer :user_id
       t.timestamps
     end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_metadata-0.2.2 db/migrate/006_create_alert_message.rb
active_metadata-0.2.1 db/migrate/006_create_alert_message.rb
active_metadata-0.2.0 db/migrate/006_create_alert_message.rb
active_metadata-0.1.9 db/migrate/006_create_alert_message.rb