Sha256: 8f465308b16884bb9a7eccb3133df874ea47b1ebf2fcfd060610ea0d92a2bf86

Contents?: true

Size: 779 Bytes

Versions: 3

Compression:

Stored size: 779 Bytes

Contents

class CreateGritterNoticesTable < ActiveRecord::Migration
  def self.up
    create_table :gritter_notices, :force => true do |t|
      t.integer  :owner_id,                           :null => false
      t.string  :owner_type,                          :null => false
      t.text     :message,                            :null => false
      # t.string   :level,        :default => "notice", :null => false
      # t.string   :title
      # t.string   :image
      # t.boolean  :sticky, :default=>false, :null=>false
      t.text     :options, :null=>false
      t.datetime :delivered_at
      t.datetime :created_at
      t.datetime :updated_at
    end

    add_index :gritter_notices, [:owner_id, :delivered_at]
  end

  def self.down
    drop_table :gritter_notices
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gritter_notices-0.3.1 lib/generators/templates/migration.rb
gritter_notices-0.2.0 lib/generators/templates/migration.rb
gritter_notices-0.1.1 lib/generators/templates/migration.rb