/* Use this file to apply db changes without having to alter tables yourself etc
The following change as of Data.pm version 0.07
*/

ALTER TABLE `friends` CHANGE `tagline` `tagline` VARCHAR( 255 ) NULL DEFAULT NULL;

CREATE TABLE `tracking` (
  `tracking_id` int(11) NOT NULL auto_increment,
  `account_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `friend_count` int(11) default NULL,
  `comment_count` int(11) default NULL,
  `profile_views` int(11) default NULL,
  PRIMARY KEY  (`tracking_id`)
);

/*
The following change as of Data.pm version 0.08
*/

CREATE TABLE `accept_log` (
  `accept_id` int(11) NOT NULL auto_increment,
  `account_id` int(11) NOT NULL,
  `friend_id` int(11) NOT NULL,
  `last_accept` datetime default NULL,
  PRIMARY KEY  (`accept_id`)
);

/*
The following change is as of Data.pm version 0.12
*/

ALTER TABLE `friends` ADD `is_invalid` CHAR( 1 ) NULL DEFAULT NULL AFTER `is_band` ,
ADD `is_private` CHAR( 1 ) NULL DEFAULT NULL AFTER `is_invalid` ;

/*
The following change is as of Data.pm version 0.13
*/

CREATE TABLE messages (
  message_id int(11),
  account_id int(11),
  `date` date,
  sender_id int(11),
  status varchar(10),
  subject varchar(255),
  message text,
  PRIMARY KEY (message_id)
);

CREATE TABLE comments (
  comment_id int(11) NOT NULL auto_increment,
  friend_id int(11),
  `time` datetime,
  sender_id int(11),
  comment text,
  PRIMARY KEY (comment_id)
);
