Andy Jarrett // Code. Develop. Create.

Blog CFC 4 MySQL update script

Im gonna be updating my blog in the next couple of days, including the look hopefully and with it came a new MySQL update script. I've only run basic tests on my local copy but i think i have covered everything. If i have missed something (most likely) drop me a line in the comments.
#
# Table structure for table tblblogtrackbacks
#

DROP TABLE IF EXISTS `tblblogtrackbacks`;
CREATE TABLE `tblblogtrackbacks` (
`Id` varchar(35) character set utf8 NOT NULL default '',
`title` varchar(255) character set utf8 NOT NULL default '',
`blogname` varchar(255) character set utf8 NOT NULL default '',
`posturl` varchar(255) character set utf8 NOT NULL default '',
`excerpt` text character set utf8 NOT NULL,
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`entryid` varchar(35) character set utf8 NOT NULL default '',
`blog` varchar(50) character set utf8 NOT NULL default '',
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

#
# Table structure for table tblblogsearchstats
#

DROP TABLE IF EXISTS `tblblogsearchstats`;
CREATE TABLE `tblblogsearchstats` (
`searchterm` varchar(255) character set utf8 NOT NULL default '',
`searched` datetime NOT NULL default '0000-00-00 00:00:00',
`blog` varchar(50) character set utf8 NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


# Adds new column to the subscribers table
ALTER TABLE `tblblogsubscribers`
ADD COLUMN `blog` varchar(50) CHARACTER SET utf8 NULL;


# Adds new 'website' column to the commentss table
ALTER TABLE `tblblogcomments`
ADD COLUMN `website` varchar(255) CHARACTER SET utf8 NULL AFTER `email`;

I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee. Your support keeps this site running and the coffee brewing! ☕️