# $Id: uipublish.sql,v 1.5 2003/03/31 06:44:03 chavan Exp $ # --------------------------------------------------------------- # DESCRIPTION : Creates tables for UIPublish # # This sql file will create a table called "UIPublish" required # for UIPublish module and one called UIPublish_cal. # --------------------------------------------------------------- # ------------------------------------------------------------------ # VERSION HISTORY: # # 2002_12_30 # - Add "topics" # # 2001_07_11 # - New table for calendar # # - Decided naming conventions: # * TableNames # * field_names # * field_primary_ID # * field_foreign_key_id # # - Status can be: # 1 = ACTIVE ( Appears on website ) # 2 = INACTIVE (Default) # # - Weight can be: # 1 = HIGH (Appears on front page) # 2 = STANDARD (Default) # 3 = LOW # ------------------------------------------------------------------ # Uncomment following line if you like to automatically delete # an existing UIPublish table. WARNING: If a UIPublish table exists # this will drop the table and all data will be lost. # # DROP TABLE UIPublish; # ---- NEWS CREATE TABLE UIPublish ( ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, modify_date TIMESTAMP, post_date DATE NOT NULL, expire_date DATE, status TINYINT DEFAULT 2, weight TINYINT DEFAULT 2, section_id TINYINT, title VARCHAR(200) NOT NULL, summary VARCHAR(255), content TEXT, link_title VARCHAR(200), link_url VARCHAR(200), filepath VARCHAR(200) ); INSERT INTO UIPublish ( ID, modify_date, post_date, expire_date, status, weight, section_id, title, summary, content, link_title, link_url, filepath) VALUES ( NULL, NULL, '2000-07-23', '2001-08-23', '1', '1', '0', 'Company Launches New Website', 'Company, Inc. has launched a new website.', 'Company, Inc has launched a new website.', 'Urban Insight', 'http://www.urbaninsight.com', '' ); # Uncomment following line if you like to automatically delete # an existing UIPublish_cal table. If a UIPublish_cal table exists # this will drop the table and all data will be lost. # # DROP TABLE UIPublish_cal; # ---- CALENDAR CREATE TABLE UIPublish_cal ( ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, modify_date TIMESTAMP, post_date DATE NOT NULL, expire_date DATE, status TINYINT DEFAULT 2, weight TINYINT DEFAULT 2, section_id TINYINT, title VARCHAR(200) NOT NULL, summary VARCHAR(255), content TEXT, link_title VARCHAR(200), link_url VARCHAR(200), filepath VARCHAR(200) ); INSERT INTO UIPublish_cal ( ID, modify_date, post_date, expire_date, status, weight, section_id, title, summary, content, link_title, link_url, filepath) VALUES ( NULL, NULL, '2000-07-23', '2001-08-23', '1', '1', '0', 'Company Launches New Calendar', 'Company, Inc. has launched a new website.', 'Company, Inc has launched a new website.', 'Urban Insight', 'http://www.urbaninsight.com', '' ); # ---- NEWS ALTER TABLE UIPublish ADD topic_id TINYINT; # ---- CALENDAR ALTER TABLE UIPublish_cal ADD topic_id TINYINT; # ---- END ----