# -*coding:utf-8 -*-
class SetNotification < ActiveRecord::Migration
  def change
    notifications = ContestNotification.all
    if notifications.nil? || notifications.count == 0
      notification = ContestNotification.new
      notification.title = "2014年Android程序设计大赛获奖名单"
      notification.content = "<div><span style='color: red'>一等奖:</span>&nbsp;<span style='color: #1166AD'>消灭那怪兽</span></div>
          <div><span style='color: red'>二等奖:</span>&nbsp;<span style='color: #1166AD'>兄弟向前冲 </span></div>
      <div><span style='color: red'>二等奖:</span>&nbsp;<span style='color: #1166AD'>鸟鸟文件管理器（银河之光版）</span></div>
      <div><span style='color: red'>三等奖:</span>&nbsp;<span style='color: #1166AD'>疯狂猜图</span></div>
      <div><span style='color: red'>三等奖:</span>&nbsp;<span style='color: #1166AD'>愉快的定向越野 </span></div>
      <div><span style='color: red'>三等奖:</span>&nbsp;<span style='color: #1166AD'>体能训练助手 </span></div>
      <div><span style='color: red'>三等奖:</span>&nbsp;<span style='color: #1166AD'>迷你日记本 </span></div>
      <div><span style='color: red'>三等奖:</span>&nbsp;<span style='color: #1166AD'>永齐飞机大战</span></div>"
       notification.save
    end
  end
end
