[dw-free] Kill the portal
[commit: http://hg.dwscoalition.org/dw-free/rev/927e88ec3a0e]
http://bugs.dwscoalition.org/show_bug.cgi?id=1551
Remove portal tables, fix drop_table in update-db.pl, change the test to use
a different table.
Patch by
exor674.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1551
Remove portal tables, fix drop_table in update-db.pl, change the test to use
a different table.
Patch by
Files modified:
- bin/upgrading/update-db-general.pl
- bin/upgrading/update-db.pl
- t/typemap.t
--------------------------------------------------------------------------------
diff -r a907ed584e44 -r 927e88ec3a0e bin/upgrading/update-db-general.pl
--- a/bin/upgrading/update-db-general.pl Fri Sep 11 14:36:06 2009 +0000
+++ b/bin/upgrading/update-db-general.pl Fri Sep 11 14:46:00 2009 +0000
@@ -907,52 +907,10 @@ register_tabledrop("pollquestion");
register_tabledrop("pollquestion");
register_tabledrop("pollresult");
register_tabledrop("pollsubmission");
-
-register_tablecreate("portal", <<'EOC');
-CREATE TABLE portal (
- userid int(10) unsigned NOT NULL default '0',
- loc enum('left','main','right','moz') NOT NULL default 'left',
- pos tinyint(3) unsigned NOT NULL default '0',
- boxname varchar(30) default NULL,
- boxargs varchar(255) default NULL,
-
- PRIMARY KEY (userid,loc,pos),
- KEY boxname (boxname)
-)
-EOC
-
-register_tablecreate("portal_box_prop", <<'EOC');
-CREATE TABLE portal_box_prop (
- userid INT(10),
- pboxid SMALLINT,
- ppropid SMALLINT,
- propvalue VARCHAR(255) BINARY,
-
- PRIMARY KEY(userid, pboxid, ppropid)
-)
-EOC
-
-register_tablecreate("portal_config", <<'EOC');
-CREATE TABLE portal_config (
- userid INT(10),
- pboxid SMALLINT,
- col CHAR(1),
- sortorder TINYINT,
- type INT,
-
- PRIMARY KEY(userid,pboxid)
-)
-EOC
-
-register_tablecreate("portal_typemap", <<'EOC');
-CREATE TABLE portal_typemap (
- id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL,
- class_name VARCHAR(255),
-
- PRIMARY KEY (id),
- UNIQUE (class_name)
-)
-EOC
+register_tabledrop("portal");
+register_tabledrop("portal_box_prop");
+register_tabledrop("portal_config");
+register_tabledrop("portal_typemap");
register_tablecreate("infohistory", <<'EOC');
CREATE TABLE infohistory (
@@ -3505,16 +3463,6 @@ register_alter(sub {
"ALTER TABLE includetext MODIFY COLUMN inctext MEDIUMTEXT");
}
- if (column_type("portal_config", "userid") !~ /unsigned/i) {
- do_alter("portal_config",
- "ALTER TABLE portal_config MODIFY COLUMN userid INT UNSIGNED NOT NULL, MODIFY COLUMN pboxid SMALLINT UNSIGNED NOT NULL, MODIFY COLUMN sortorder SMALLINT UNSIGNED NOT NULL, MODIFY COLUMN type INT UNSIGNED NOT NULL");
- }
-
- if (column_type("portal_box_prop", "userid") !~ /unsigned/i) {
- do_alter("portal_box_prop",
- "ALTER TABLE portal_box_prop MODIFY COLUMN userid INT UNSIGNED NOT NULL, MODIFY COLUMN pboxid SMALLINT UNSIGNED NOT NULL, MODIFY COLUMN ppropid SMALLINT UNSIGNED NOT NULL");
- }
-
# These table are both livejournal tables, although could have ljcom values
# that we need to update. Not trying to be lazy, but running the updates in
# update-db-local.pl would cause us to have to do a select on the table everytime
diff -r a907ed584e44 -r 927e88ec3a0e bin/upgrading/update-db.pl
--- a/bin/upgrading/update-db.pl Fri Sep 11 14:36:06 2009 +0000
+++ b/bin/upgrading/update-db.pl Fri Sep 11 14:46:00 2009 +0000
@@ -795,7 +795,6 @@ sub drop_table
sub drop_table
{
my $table = shift;
- return if $cluster && ! defined $clustered_table{$table};
if ($opt_drop) {
do_sql("DROP TABLE $table");
diff -r a907ed584e44 -r 927e88ec3a0e t/typemap.t
--- a/t/typemap.t Fri Sep 11 14:36:06 2009 +0000
+++ b/t/typemap.t Fri Sep 11 14:46:00 2009 +0000
@@ -6,9 +6,9 @@ use LJ::Typemap;
use LJ::Typemap;
use LJ::Test;
-my $table = 'portal_typemap';
-my $classfield = 'class_name';
-my $idfield = 'id';
+my $table = 'cprodlist';
+my $classfield = 'class';
+my $idfield = 'cprodid';
sub run_tests {
my $tm;
--------------------------------------------------------------------------------
