| schema.rb - reportable - Fork of reportable required by WarVox, from hdm/report… | |
| git clone git://jay.scot/reportable | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| schema.rb (1221B) | |
| --- | |
| 1 ActiveRecord::Schema.define(:version => 1) do | |
| 2 | |
| 3 create_table :users, :force => true do |t| | |
| 4 t.string :login, :null => false | |
| 5 t.integer :profile_visits, :null => false, :default => 0 | |
| 6 t.string :type, :null => false, :default => 'User' | |
| 7 t.string :sub_type | |
| 8 | |
| 9 t.timestamps | |
| 10 end | |
| 11 | |
| 12 create_table :reportable_cache, :force => true do |t| | |
| 13 t.string :model_name, :null => false, :limit => 100 | |
| 14 t.string :report_name, :null => false, :limit => 100 | |
| 15 t.string :grouping, :null => false, :limit => 10 | |
| 16 t.string :aggregation, :null => false, :limit => 10 | |
| 17 t.string :conditions, :null => false, :limit => 100 | |
| 18 t.float :value, :null => false, :defaul… | |
| 19 t.datetime :reporting_period, :null => false | |
| 20 | |
| 21 t.timestamps | |
| 22 end | |
| 23 add_index :reportable_cache, [ | |
| 24 :model_name, | |
| 25 :report_name, | |
| 26 :grouping, | |
| 27 :aggregation, | |
| 28 :conditions | |
| 29 ], :name => 'name_model_grouping_agregation' | |
| 30 add_index :reportable_cache, [ | |
| 31 :model_name, | |
| 32 :report_name, | |
| 33 :grouping, | |
| 34 :aggregation, | |
| 35 :conditions, | |
| 36 :reporting_period | |
| 37 ], :unique => true, :name => 'name_model_grouping_aggregation_period' | |
| 38 | |
| 39 end |