--- trunk/schema.sql	2005/05/14 11:44:05	4
+++ trunk/schema.sql	2005/05/14 12:31:15	5
@@ -17,6 +17,8 @@
 	primary key(id)
 );
 
+create index lists_name_ind on lists(name);
+
 create table user_list (
 	user_id	int not null references users(id) on update cascade on delete cascade,
 	list_id int not null references lists(id) on update cascade on delete cascade,
@@ -26,12 +28,13 @@
 
 create table messages (
 	id	serial,
-	from	text not null,
 	message text not null,
 	date	timestamp not null default now(),
 	primary key(id)
 );
 
+create index messages_md5_ind on messages(md5);
+
 create table message_list (
 	message_id int not null references messages(id) on update cascade on delete cascade,
 	list_id int not null references lists(id) on update cascade on delete cascade,
@@ -43,6 +46,7 @@
 	message_id int not null references messages(id) on update cascade on delete cascade,
 	user_id	int not null references users(id) on update cascade on delete cascade,
 	date	timestamp not null default now(),
+	sent	boolean not null default false,
 	primary key(message_id, user_id)
 );
 
