 	user text not null,
 	comment text not null
 );
+CREATE INDEX comments_ticket_id on comments ( ticket_id );
 
 CREATE TABLE statustrack ( id integer primary key not null,
 	ticket_id integer not null references ticket ( id ),

	user text not null,
	status text not null
);

CREATE TABLE tags (
	ticket_id integer not null references ticket ( id ),
	tag text not null
);

CREATE TABLE timetrack (
	id integer primary key not null,

	dateclosed datetime,
	user text not null
);
CREATE INDEX tickets_dateclosed on tickets ( dateclosed desc );
CREATE INDEX tickets_datecreated on tickets ( datecreated desc );
CREATE INDEX tickets_datemodified on tickets ( datemodified desc );
CREATE INDEX tickets_priority on tickets ( priority );
CREATE INDEX tickets_status on tickets ( status );
CREATE INDEX tickets_user on tickets ( user );

CREATE TABLE comments ( 
	id integer primary key not null,
