Permalink
Browse files

fixing schema to allow history of lending books.... might not be real…

…ly efficient after all to let that table grow infinitely, but it is a good starting approach
  • Loading branch information...
bmejias committed Sep 14, 2011
1 parent 6d5d642 commit 40eb759a4e007c683961060f5005656d6a83facd
Showing with 2 additions and 3 deletions.
  1. +2 −3 sql/pgsql_create_schema.sql
@@ -49,14 +49,13 @@ CREATE TABLE group_users
CREATE TABLE loans
(
- id serial,
+ id serial PRIMARY KEY,
material_id serial REFERENCES materials(id),
user_id serial REFERENCES users(id),
date_out date NOT NULL,
date_in date,
status varchar(16) NOT NULL,
- money int,
- PRIMARY KEY (material_id, user_id)
+ money int
);
CREATE TABLE rules

0 comments on commit 40eb759

Please sign in to comment.