<?php 

require_once("mainfile.php"); 
include("header.php");
title("Correcting username length in db tables");
OpenTable();

$result = $db->sql_query("alter table ".$prefix."_stories change informant informant varchar(25) not null default ''"); 
if (!$result) { echo "Modification one to ".$prefix."_stories failed<br />\n"; } else { echo "Modification one to ".$prefix."_stories performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_stories change aid aid varchar(25) not null default ''"); 
if (!$result) { echo "Modification two to ".$prefix."_stories failed<br />\n"; } else { echo "Modification two to ".$prefix."_stories performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_autonews change informant informant varchar(25) not null default ''"); 
if (!$result) { echo "Modification one to ".$prefix."_autonews failed<br />\n"; } else { echo "Modification one to ".$prefix."_autonews performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_autonews change aid aid varchar(25) not null default ''"); 
if (!$result) { echo "Modification two to ".$prefix."_autonews failed<br />\n"; } else { echo "Modification two to ".$prefix."_autonews performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_reviews change reviewer reviewer varchar(25) default NULL"); 
if (!$result) { echo "Modification to ".$prefix."_reviews failed<br />\n"; } else { echo "Modification to ".$prefix."_reviews performed<br />\n"; }
$result = $db->sql_query("alter table ".$prefix."_reviews_add change reviewer reviewer varchar(25) not null default ''"); 
if (!$result) { echo "Modification to ".$prefix."_reviews_add failed<br><br />\n"; } else { echo "Modification to ".$prefix."_reviews_add performed<br><br />\n"; }

echo "Correction finished, <b>Delete this file now!</b><br><br />\n";
echo "Back to <a href=\"index.php\">website</a>\n";
CloseTable();
include("footer.php");
 
?>