20130529124443_taskbar.rb 997 B

1234567891011121314151617181920212223
  1. class Taskbar < ActiveRecord::Migration
  2. def up
  3. create_table :taskbars do |t|
  4. t.column :user_id, :integer, :null => false
  5. t.column :last_contact, :datetime, :null => false
  6. t.column :client_id, :string, :null => false
  7. t.column :key, :string, :limit => 100, :null => false
  8. t.column :callback, :string, :limit => 100, :null => false
  9. t.column :state, :string, :limit => 8000, :null => true
  10. t.column :params, :string, :limit => 2000, :null => true
  11. t.column :prio, :integer, :null => false
  12. t.column :notify, :boolean, :null => false, :default => false
  13. t.column :active, :boolean, :null => false, :default => false
  14. t.timestamps
  15. end
  16. add_index :taskbars, [:user_id]
  17. add_index :taskbars, [:client_id]
  18. end
  19. def down
  20. drop_table :taskbars
  21. end
  22. end