To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 4a / 4a0b59f652c0c5306fec4e23a9b966da98c95f60.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (966 Bytes)
| 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 |