comparison db/migrate/.svn/text-base/032_create_time_entries.rb.svn-base @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:513646585e45
1 class CreateTimeEntries < ActiveRecord::Migration
2 def self.up
3 create_table :time_entries do |t|
4 t.column :project_id, :integer, :null => false
5 t.column :user_id, :integer, :null => false
6 t.column :issue_id, :integer
7 t.column :hours, :float, :null => false
8 t.column :comments, :string, :limit => 255
9 t.column :activity_id, :integer, :null => false
10 t.column :spent_on, :date, :null => false
11 t.column :tyear, :integer, :null => false
12 t.column :tmonth, :integer, :null => false
13 t.column :tweek, :integer, :null => false
14 t.column :created_on, :datetime, :null => false
15 t.column :updated_on, :datetime, :null => false
16 end
17 add_index :time_entries, [:project_id], :name => :time_entries_project_id
18 add_index :time_entries, [:issue_id], :name => :time_entries_issue_id
19 end
20
21 def self.down
22 drop_table :time_entries
23 end
24 end