Commit 37d66b99 authored by Mike Hibler's avatar Mike Hibler
Browse files

Allow leading spaces in virt_vtype defns ala:

  tb-make-hard-vtype clients { pc3000 pc850 pc600}
parent 3877b580
......@@ -893,7 +893,7 @@ REPLACE INTO table_regex VALUES ('virt_vtypes','pid','text','redirect','projects
REPLACE INTO table_regex VALUES ('virt_vtypes','eid','text','redirect','experiments:eid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_vtypes','name','text','regex','^[-\\w]+$',1,32,NULL);
REPLACE INTO table_regex VALUES ('virt_vtypes','weight','float','redirect','default:float',0,1,NULL);
REPLACE INTO table_regex VALUES ('virt_vtypes','members','text','regex','^([-\\w]+ ?)+$',0,1024,NULL);
REPLACE INTO table_regex VALUES ('virt_vtypes','members','text','regex','^( ?[-\\w]+ ?)+$',0,1024,NULL);
REPLACE INTO table_regex VALUES ('default','tinytext','text','regex','^[\\040-\\176]*$',0,256,NULL);
REPLACE INTO table_regex VALUES ('default','text','text','regex','^[\\040-\\176]*$',0,65535,NULL);
REPLACE INTO table_regex VALUES ('projects','why','text','regex','^[\\040-\\176\\012\\015\\011]*$',0,4096,NULL);
......
#
# Allow leading spaces in virt_vtype defns; e.g.:
# tb-make-hard-vtype clients { pc3000 pc850 pc600}
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBQueryFatal("REPLACE INTO table_regex VALUES ('virt_vtypes','members',".
" 'text','regex','^( ?[-\\\\w]+ ?)+\$',0,1024,NULL)");
return 0;
}
1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment