annotate .svn/pristine/4a/4a0b59f652c0c5306fec4e23a9b966da98c95f60.svn-base @ 1021:967fb7e62b1d
browsing
Include only public projects in busy institutions / projects queries, so results can be cached (the tag cloud was already public projects only). Introduce tentatively some cacheing thingies
author |
Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
date |
Tue, 13 Nov 2012 10:35:23 +0000 |
parents |
cbb26bc654de |
children |
|
rev |
line source |
Chris@909
|
1 class CreateTimeEntries < ActiveRecord::Migration
|
Chris@909
|
2 def self.up
|
Chris@909
|
3 create_table :time_entries do |t|
|
Chris@909
|
4 t.column :project_id, :integer, :null => false
|
Chris@909
|
5 t.column :user_id, :integer, :null => false
|
Chris@909
|
6 t.column :issue_id, :integer
|
Chris@909
|
7 t.column :hours, :float, :null => false
|
Chris@909
|
8 t.column :comments, :string, :limit => 255
|
Chris@909
|
9 t.column :activity_id, :integer, :null => false
|
Chris@909
|
10 t.column :spent_on, :date, :null => false
|
Chris@909
|
11 t.column :tyear, :integer, :null => false
|
Chris@909
|
12 t.column :tmonth, :integer, :null => false
|
Chris@909
|
13 t.column :tweek, :integer, :null => false
|
Chris@909
|
14 t.column :created_on, :datetime, :null => false
|
Chris@909
|
15 t.column :updated_on, :datetime, :null => false
|
Chris@909
|
16 end
|
Chris@909
|
17 add_index :time_entries, [:project_id], :name => :time_entries_project_id
|
Chris@909
|
18 add_index :time_entries, [:issue_id], :name => :time_entries_issue_id
|
Chris@909
|
19 end
|
Chris@909
|
20
|
Chris@909
|
21 def self.down
|
Chris@909
|
22 drop_table :time_entries
|
Chris@909
|
23 end
|
Chris@909
|
24 end
|