Merge branch 'stats'

This commit is contained in:
Benjamin Meichsner 2009-08-02 19:57:19 +02:00
commit 6659fe90f3
65 changed files with 393 additions and 324 deletions

View file

@ -1,9 +1,8 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: article_categories
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# description :string(255)
#

View file

@ -1,14 +1,13 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: article_prices
#
# id :integer not null, primary key
# article_id :integer
# id :integer(4) not null, primary key
# article_id :integer(4)
# price :decimal(8, 2) default(0.0), not null
# tax :decimal(8, 2) default(0.0), not null
# deposit :decimal(8, 2) default(0.0), not null
# unit_quantity :integer
# unit_quantity :integer(4)
# created_at :datetime
#

View file

@ -1,28 +1,27 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: articles
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# supplier_id :integer default(0), not null
# article_category_id :integer default(0), not null
# supplier_id :integer(4) default(0), not null
# article_category_id :integer(4) default(0), not null
# unit :string(255) default(""), not null
# note :string(255)
# availability :boolean default(TRUE), not null
# availability :boolean(1) default(TRUE), not null
# manufacturer :string(255)
# origin :string(255)
# shared_updated_on :datetime
# price :decimal(, )
# price :decimal(8, 2)
# tax :float
# deposit :decimal(, ) default(0.0)
# unit_quantity :integer default(1), not null
# deposit :decimal(8, 2) default(0.0)
# unit_quantity :integer(4) default(1), not null
# order_number :string(255)
# created_at :datetime
# updated_at :datetime
# quantity :integer default(0)
# deleted_at :datetime
# type :string(255)
# quantity :integer(4) default(0)
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,12 +1,11 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: assignments
#
# id :integer not null, primary key
# user_id :integer default(0), not null
# task_id :integer default(0), not null
# accepted :boolean
# id :integer(4) not null, primary key
# user_id :integer(4) default(0), not null
# task_id :integer(4) default(0), not null
# accepted :boolean(1)
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,13 +1,12 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: financial_transactions
#
# id :integer not null, primary key
# ordergroup_id :integer default(0), not null
# id :integer(4) not null, primary key
# ordergroup_id :integer(4) default(0), not null
# amount :decimal(8, 2) default(0.0), not null
# note :text not null
# user_id :integer default(0), not null
# note :text default(""), not null
# user_id :integer(4) default(0), not null
# created_on :datetime not null
#

View file

@ -1,12 +1,11 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: group_order_article_quantities
#
# id :integer not null, primary key
# group_order_article_id :integer default(0), not null
# quantity :integer default(0)
# tolerance :integer default(0)
# id :integer(4) not null, primary key
# group_order_article_id :integer(4) default(0), not null
# quantity :integer(4) default(0)
# tolerance :integer(4) default(0)
# created_on :datetime not null
#

View file

@ -1,29 +1,29 @@
# == Schema Information
# Schema version: 20090120184410
#
# Table name: groups
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# role_admin :boolean(1) not null
# role_suppliers :boolean(1) not null
# role_article_meta :boolean(1) not null
# role_finance :boolean(1) not null
# role_orders :boolean(1) not null
# weekly_task :boolean(1)
# weekday :integer(4)
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# task_required_users :integer(4) default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,11 +1,10 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: memberships
#
# id :integer not null, primary key
# group_id :integer default(0), not null
# user_id :integer default(0), not null
# id :integer(4) not null, primary key
# group_id :integer(4) default(0), not null
# user_id :integer(4) default(0), not null
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,15 +1,14 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: messages
#
# id :integer not null, primary key
# sender_id :integer
# id :integer(4) not null, primary key
# sender_id :integer(4)
# recipients_ids :text
# subject :string(255) not null
# body :text
# email_state :integer default(0), not null
# private :boolean
# email_state :integer(4) default(0), not null
# private :boolean(1)
# created_at :datetime
#

View file

@ -1,11 +1,10 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: order_comments
#
# id :integer not null, primary key
# order_id :integer
# user_id :integer
# id :integer(4) not null, primary key
# order_id :integer(4)
# user_id :integer(4)
# text :text
# created_at :datetime
#

View file

@ -1,16 +1,15 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: orders
#
# id :integer not null, primary key
# supplier_id :integer
# id :integer(4) not null, primary key
# supplier_id :integer(4)
# note :text
# starts :datetime
# ends :datetime
# state :string(255) default("open")
# lock_version :integer default(0), not null
# updated_by_user_id :integer
# lock_version :integer(4) default(0), not null
# updated_by_user_id :integer(4)
# foodcoop_result :decimal(8, 2)
#

View file

@ -1,15 +1,14 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: stock_changes
#
# id :integer not null, primary key
# delivery_id :integer
# order_id :integer
# stock_article_id :integer
# quantity :integer default(0)
# id :integer(4) not null, primary key
# delivery_id :integer(4)
# order_id :integer(4)
# stock_article_id :integer(4)
# quantity :integer(4) default(0)
# created_at :datetime
# stock_taking_id :integer
# stock_taking_id :integer(4)
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,9 +1,8 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: stock_takings
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# date :date
# note :text
# created_at :datetime

View file

@ -1,5 +1,4 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: suppliers
#

View file

@ -1,18 +1,17 @@
# == Schema Information
# Schema version: 20090119155930
#
# Table name: tasks
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# description :string(255)
# due_date :date
# done :boolean
# workgroup_id :integer
# assigned :boolean
# done :boolean(1)
# workgroup_id :integer(4)
# assigned :boolean(1)
# created_on :datetime not null
# updated_on :datetime not null
# required_users :integer default(1)
# required_users :integer(4) default(1)
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,9 +1,8 @@
# == Schema Information
# Schema version: 20090120184410
#
# Table name: users
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# nick :string(255) default(""), not null
# password_hash :string(255) default(""), not null
# password_salt :string(255) default(""), not null

View file

@ -1,9 +1,8 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: article_categories
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# description :string(255)
#

View file

@ -1,14 +1,13 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: article_prices
#
# id :integer not null, primary key
# article_id :integer
# id :integer(4) not null, primary key
# article_id :integer(4)
# price :decimal(8, 2) default(0.0), not null
# tax :decimal(8, 2) default(0.0), not null
# deposit :decimal(8, 2) default(0.0), not null
# unit_quantity :integer
# unit_quantity :integer(4)
# created_at :datetime
#

View file

@ -1,28 +1,27 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: articles
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# supplier_id :integer default(0), not null
# article_category_id :integer default(0), not null
# supplier_id :integer(4) default(0), not null
# article_category_id :integer(4) default(0), not null
# unit :string(255) default(""), not null
# note :string(255)
# availability :boolean default(TRUE), not null
# availability :boolean(1) default(TRUE), not null
# manufacturer :string(255)
# origin :string(255)
# shared_updated_on :datetime
# price :decimal(, )
# price :decimal(8, 2)
# tax :float
# deposit :decimal(, ) default(0.0)
# unit_quantity :integer default(1), not null
# deposit :decimal(8, 2) default(0.0)
# unit_quantity :integer(4) default(1), not null
# order_number :string(255)
# created_at :datetime
# updated_at :datetime
# quantity :integer default(0)
# deleted_at :datetime
# type :string(255)
# quantity :integer(4) default(0)
#
require File.dirname(__FILE__) + '/../test_helper'

View file

@ -1,12 +1,11 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: assignments
#
# id :integer not null, primary key
# user_id :integer default(0), not null
# task_id :integer default(0), not null
# accepted :boolean
# id :integer(4) not null, primary key
# user_id :integer(4) default(0), not null
# task_id :integer(4) default(0), not null
# accepted :boolean(1)
#
require File.dirname(__FILE__) + '/../test_helper'

View file

@ -1,13 +1,12 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: financial_transactions
#
# id :integer not null, primary key
# ordergroup_id :integer default(0), not null
# id :integer(4) not null, primary key
# ordergroup_id :integer(4) default(0), not null
# amount :decimal(8, 2) default(0.0), not null
# note :text not null
# user_id :integer default(0), not null
# note :text default(""), not null
# user_id :integer(4) default(0), not null
# created_on :datetime not null
#

View file

@ -1,12 +1,11 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: group_order_article_quantities
#
# id :integer not null, primary key
# group_order_article_id :integer default(0), not null
# quantity :integer default(0)
# tolerance :integer default(0)
# id :integer(4) not null, primary key
# group_order_article_id :integer(4) default(0), not null
# quantity :integer(4) default(0)
# tolerance :integer(4) default(0)
# created_on :datetime not null
#

View file

@ -1,29 +1,29 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: groups
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# role_admin :boolean(1) not null
# role_suppliers :boolean(1) not null
# role_article_meta :boolean(1) not null
# role_finance :boolean(1) not null
# role_orders :boolean(1) not null
# weekly_task :boolean(1)
# weekday :integer(4)
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# task_required_users :integer(4) default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#
require File.dirname(__FILE__) + '/../test_helper'

View file

@ -1,11 +1,10 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: memberships
#
# id :integer not null, primary key
# group_id :integer default(0), not null
# user_id :integer default(0), not null
# id :integer(4) not null, primary key
# group_id :integer(4) default(0), not null
# user_id :integer(4) default(0), not null
#
require File.dirname(__FILE__) + '/../test_helper'

View file

@ -1,11 +1,10 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: order_comments
#
# id :integer not null, primary key
# order_id :integer
# user_id :integer
# id :integer(4) not null, primary key
# order_id :integer(4)
# user_id :integer(4)
# text :text
# created_at :datetime
#

View file

@ -1,16 +1,15 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: orders
#
# id :integer not null, primary key
# supplier_id :integer
# id :integer(4) not null, primary key
# supplier_id :integer(4)
# note :text
# starts :datetime
# ends :datetime
# state :string(255) default("open")
# lock_version :integer default(0), not null
# updated_by_user_id :integer
# lock_version :integer(4) default(0), not null
# updated_by_user_id :integer(4)
# foodcoop_result :decimal(8, 2)
#

View file

@ -1,28 +1,27 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: articles
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# supplier_id :integer default(0), not null
# article_category_id :integer default(0), not null
# supplier_id :integer(4) default(0), not null
# article_category_id :integer(4) default(0), not null
# unit :string(255) default(""), not null
# note :string(255)
# availability :boolean default(TRUE), not null
# availability :boolean(1) default(TRUE), not null
# manufacturer :string(255)
# origin :string(255)
# shared_updated_on :datetime
# price :decimal(, )
# price :decimal(8, 2)
# tax :float
# deposit :decimal(, ) default(0.0)
# unit_quantity :integer default(1), not null
# deposit :decimal(8, 2) default(0.0)
# unit_quantity :integer(4) default(1), not null
# order_number :string(255)
# created_at :datetime
# updated_at :datetime
# quantity :integer default(0)
# deleted_at :datetime
# type :string(255)
# quantity :integer(4) default(0)
#
require 'test_helper'

View file

@ -1,15 +1,14 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: stock_changes
#
# id :integer not null, primary key
# delivery_id :integer
# order_id :integer
# stock_article_id :integer
# quantity :integer default(0)
# id :integer(4) not null, primary key
# delivery_id :integer(4)
# order_id :integer(4)
# stock_article_id :integer(4)
# quantity :integer(4) default(0)
# created_at :datetime
# stock_taking_id :integer
# stock_taking_id :integer(4)
#
require 'test_helper'

View file

@ -1,9 +1,8 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: stock_takings
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# date :date
# note :text
# created_at :datetime

View file

@ -1,9 +1,8 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: suppliers
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# address :string(255) default(""), not null
# phone :string(255) default(""), not null
@ -16,7 +15,7 @@
# delivery_days :string(255)
# order_howto :string(255)
# note :string(255)
# shared_supplier_id :integer
# shared_supplier_id :integer(4)
# min_order_quantity :string(255)
# deleted_at :datetime
#

View file

@ -1,18 +1,17 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: tasks
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# name :string(255) default(""), not null
# description :string(255)
# due_date :date
# done :boolean
# workgroup_id :integer
# assigned :boolean
# done :boolean(1)
# workgroup_id :integer(4)
# assigned :boolean(1)
# created_on :datetime not null
# updated_on :datetime not null
# required_users :integer default(1)
# required_users :integer(4) default(1)
#
require File.dirname(__FILE__) + '/../test_helper'

View file

@ -1,9 +1,8 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: users
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# nick :string(255) default(""), not null
# password_hash :string(255) default(""), not null
# password_salt :string(255) default(""), not null

View file

@ -1,29 +1,29 @@
# == Schema Information
# Schema version: 20090317175355
#
# Table name: groups
#
# id :integer not null, primary key
# id :integer(4) not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# role_admin :boolean(1) not null
# role_suppliers :boolean(1) not null
# role_article_meta :boolean(1) not null
# role_finance :boolean(1) not null
# role_orders :boolean(1) not null
# weekly_task :boolean(1)
# weekday :integer(4)
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# task_required_users :integer(4) default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#
require 'test_helper'