[Picfinity-commit] SF.net SVN: picfinity: [51] trunk/picfinity_db.sql
Status: Beta
Brought to you by:
espadav8
From: <esp...@us...> - 2007-08-19 11:36:28
|
Revision: 51 http://picfinity.svn.sourceforge.net/picfinity/?rev=51&view=rev Author: espadav8 Date: 2007-08-19 04:36:32 -0700 (Sun, 19 Aug 2007) Log Message: ----------- Initial import of the SQL to create the database for the comments (likely to change) Added Paths: ----------- trunk/picfinity_db.sql Added: trunk/picfinity_db.sql =================================================================== --- trunk/picfinity_db.sql (rev 0) +++ trunk/picfinity_db.sql 2007-08-19 11:36:32 UTC (rev 51) @@ -0,0 +1,24 @@ +CREATE DATABASE IF NOT EXISTS picfinity; + +CREATE TABLE IF NOT EXISTS picfinity.images ( + image_id INT UNSIGNED NOT NULL AUTO_INCREMENT KEY, + image_md5 CHAR(34), + title CHAR(255), + description TEXT, + views INT UNSIGNED DEFAULT 0, + rating INT DEFAULT 0 +) ENGINE = InnoDB; + +CREATE TABLE IF NOT EXISTS picfinity.comments ( + comment_id INT UNSIGNED NOT NULL AUTO_INCREMENT KEY, + image_id INT UNSIGNED NOT NULL, + user_comment TEXT, + user_ip INT(15) NOT NULL DEFAULT 0, + user_name CHAR(255), + user_email CHAR(255), + user_www CHAR(255), + comment_rating INT DEFAULT 0, + approved TINYINT(1) DEFAULT 0, + date_added TIMESTAMP, + FOREIGN KEY (image_id) REFERENCES images(image_id) ON DELETE CASCADE + ) ENGINE = InnoDB; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |