--- loncom/metadata_database/LONCAPA/lonmetadata.pm 2004/01/12 21:32:20 1.2 +++ loncom/metadata_database/LONCAPA/lonmetadata.pm 2004/01/12 21:48:38 1.3 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonmetadata.pm,v 1.2 2004/01/12 21:32:20 matthew Exp $ +# $Id: lonmetadata.pm,v 1.3 2004/01/12 21:48:38 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -183,7 +183,7 @@ sub describe_metadata_storage { =item create_metadata_storage() -Inputs: None +Inputs: table name (optional): the name of the table. Default is 'metadata'. Returns: A perl string which, when executed by MySQL, will cause the metadata storage to be initialized. @@ -193,7 +193,8 @@ metadata storage to be initialized. ###################################################################### ###################################################################### sub create_metadata_storage { - my $tablename = 'metadata'; + my ($tablename) = @_; + $tablename = 'metadata' if (! defined($tablename)); my $request = "CREATE TABLE IF NOT EXISTS ".$tablename." "; # # Process the columns (this code is stolen from lonmysql.pm) @@ -230,7 +231,7 @@ sub create_metadata_storage { my $text = 'FULLTEXT idx_'.$colname.' ('.$colname.')'; push (@Columns,$text); } - $request .= "(".join(", ",@Columns).") "; + $request .= "(".join(", ",@Columns).") TYPE=MyISAM"; return $request; }