20130201071513_create_sla.rb 891 B

1234567891011121314151617181920
  1. class CreateSla < ActiveRecord::Migration
  2. def up
  3. create_table :slas do |t|
  4. t.column :name, :string, :limit => 150, :null => true
  5. # t.column :first_response_time, :integer, :null => true
  6. # t.column :update_time, :integer, :null => true
  7. # t.column :close_time, :integer, :null => true
  8. t.column :condition, :string, :limit => 5000, :null => true
  9. t.column :data, :string, :limit => 5000, :null => true
  10. t.column :active, :boolean, :null => false, :default => true
  11. t.column :updated_by_id, :integer, :null => false
  12. t.column :created_by_id, :integer, :null => false
  13. t.timestamps
  14. end
  15. add_index :slas, [:name], :unique => true
  16. end
  17. def down
  18. end
  19. end