Skip to content

Commit

Permalink
Small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianAker committed Apr 15, 2002
1 parent 93ea453 commit 0aa59de
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
11 changes: 11 additions & 0 deletions sql/mysql/defaults.sql
Expand Up @@ -210,11 +210,22 @@ INSERT INTO site_info VALUES ('','form','comments','comments submission form');
#

#
<<<<<<< defaults.sql
# Dumping data for table 'string_param'
#

INSERT INTO string_param (type, code, name) VALUES ('yes_no','yes','yes');
INSERT INTO string_param (type, code, name) VALUES ('yes_no','no','no');


#
=======
# Dumping data for string_param
#
INSERT INTO string_param (Type, code, name) VALUES ('section_topic_type','topic_1','Default');

#
>>>>>>> 1.38
# Dumping data for table 'submissions'
#

Expand Down
27 changes: 25 additions & 2 deletions sql/mysql/slashschema_create.sql
Expand Up @@ -115,6 +115,7 @@ CREATE TABLE blocks (
last_update timestamp,
rss_template varchar(30),
items smallint NOT NULL DEFAULT '0',
autosubmit enum("no","yes") DEFAULT 'no' NOT NULL,
FOREIGN KEY (rss_template) REFERENCES templates(name),
PRIMARY KEY (bid),
KEY type (type),
Expand Down Expand Up @@ -171,7 +172,7 @@ CREATE TABLE comments (
KEY ipid (ipid),
KEY subnetid (subnetid),
KEY theusual (sid,uid,points,cid),
KEY countreplies (sid,pid)
KEY countreplies (pid,sid)
) TYPE = myisam;

#
Expand Down Expand Up @@ -412,6 +413,28 @@ CREATE TABLE pollvoters (
KEY qid (qid,id,uid)
) TYPE = myisam;

#
# Table structure for table 'rss_raw'
#

DROP TABLE IF EXISTS rss_raw;
CREATE TABLE rss_raw (
id smallint UNSIGNED NOT NULL auto_increment,
link_signature char(32) DEFAULT '' NOT NULL,
title_signature char(32) DEFAULT '' NOT NULL,
description_signature char(32) DEFAULT '' NOT NULL,
link varchar(255) NOT NULL,
title varchar(255) NOT NULL,
description varchar(255) NOT NULL,
subid varchar(15),
bid varchar(30),
created datetime,
UNIQUE uber_signature (link_signature, title_signature, description_signature),
FOREIGN KEY (subid) REFERENCES submissions(subid),
FOREIGN KEY (bid) REFERENCES blocks(bid),
PRIMARY KEY (id)
) TYPE = myisam;

#
# Table structure for table 'related_links'
#
Expand Down Expand Up @@ -480,7 +503,7 @@ CREATE TABLE section_topics (
type varchar(16) NOT NULL DEFAULT 'topic_1',
FOREIGN KEY (section) REFERENCES sections(section),
FOREIGN KEY (tid) REFERENCES topics(tid),
PRIMARY KEY (section,tid)
PRIMARY KEY (section,type,tid)
) TYPE = myisam;

#
Expand Down
8 changes: 7 additions & 1 deletion sql/mysql/upgrades
Expand Up @@ -202,17 +202,23 @@ CREATE TABLE slashd_status (
# Unique changes for Pat
ALTER TABLE section_topics DROP PRIMARY KEY;
ALTER TABLE section_topics ADD PRIMARY KEY (section,type,tid);
INSERT INTO string_param (type, code, name) VALUES ('yes_no','yes','yes');
INSERT INTO string_param (type, code, name) VALUES ('yes_no','no','no');
INSERT INTO vars (name, value, description) VALUES ('label_ui','0','Whether to label some things in the admin ui');
INSERT INTO vars (name, value, description) VALUES ('enable_index_topic','','set this to the value in string param for index topic \(something like "topic_4"\)');
INSERT INTO vars (name, value, description) VALUES ('get_titles','0','get the story titles');
INSERT INTO vars (name, value, description) VALUES ('organise_stories','','organise story blocks');
INSERT INTO string_param (Type, code, name) VALUES ('section_topic_type','topic_1','Default');


# another small change for topic types
ALTER TABLE section_topics MODIFY COLUMN type varchar(16) NOT NULL DEFAULT 'topic_1';
UPDATE section_topics SET type = 'topic_1' WHERE topic = '1';

# Change for plugins/Subscribe
ALTER TABLE subscribe_payments ADD COLUMN method VARCHAR(6) AFTER transaction_id;

ALTER TABLE comments DROP index countreplies;
ALTER TABLE comments ADD KEY countreplies (pid,sid);

# Not read just yet but I am leaving it here as a note -Brian
# ALTER TABLE blocks ADD autosubmit enum("no","yes") DEFAULT 'no' NOT NULL;

0 comments on commit 0aa59de

Please sign in to comment.