Skip to Content.
Sympa Menu

devel - [sympa-dev] Storing / Retrieving List Information with SQL

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: address@concealed
  • To: address@concealed
  • Subject: [sympa-dev] Storing / Retrieving List Information with SQL
  • Date: Fri, 27 Jul 2007 04:58:13 -0700

Salut,

I have made some edits to allow sympa to use an SQL database to store and
retrieve select information about hosted lists. As of now, the only
attributes stored in the database are those which are relevant to commonly
used functions inside of wwsympa.

This has dramatically improved the performance of our Sympa server. Memory
usage for a wwsympa process is down from 1GB to 80MB, and response times for
the homepage has decreased by 1/10th.

There is an expanded database schema with a list_table table, and a new
option to sympa.pl for syncing the lists on the filesystem with the new
database table.

I have abandoned, for now, the usage of memcached for storing list attributes
-- as a proper implementation would require quite a bit of work, and the
performance gain would not warrant the amount of coding required.

Again, thanks for everybody's attention to this matter- and I hope that my
edits are welcomed by the Sympa development community.

Salut,
Charles

--- /home/sympa/bin/List.pm 2007-07-27 02:23:08.000000000 -0700
+++ src/sympa-5.3.2/src/List.pm 2007-06-12 02:34:38.000000000 -0700
@@ -31,7 +31,7 @@
require Exporter;
require Encode;
require 'tools.pl';
-require "/home/sympa/bin/tt2.pl";
+require "--LIBDIR--/tt2.pl";

my @ISA = qw(Exporter);
my @EXPORT = qw(%list_of_lists);
@@ -243,7 +243,6 @@
use Family;
use PlainDigest;

-
## Database and SQL statement handlers
my ($dbh, $sth, $db_connected, @sth_stack, $use_db);

@@ -1266,7 +1265,6 @@
my %list_of_topics = ();
my %edit_list_conf = ();

-
## Last modification times
my %mtime;

@@ -1693,13 +1691,6 @@
$lock->unlock();
return undef;
}
-
- if ($List::use_db){
- unless (&_update_list_db){
- &do_log('err', "Unable to update list_table");
- }
- }
-

## Also update the binary version of the data structure
if (&Conf::get_robot_conf($self->{'robot'}, 'cache_list_config') eq
'binary_file') {
@@ -1953,11 +1944,6 @@
# }

$self->{'mtime'} = [ $m1, $m2, $m3];
- #if ($List::use_db){
- # unless (&_update_list_db){
-# &do_log('err', "Unable to update list_table");
-# }
-# }

$list_of_lists{$self->{'domain'}}{$name} = $self;
return $config_reloaded;
@@ -7161,7 +7147,6 @@
undef %list_cache;
}

-
## check if email respect some condition
sub verify {
my ($context, $condition) = @_;
@@ -8090,7 +8075,7 @@
unless (open SCENARI, $scenario_file) {

## Distrib scenario
- $scenario_file =
"/home/sympa/bin/etc/scenari/$function.$name";
+ $scenario_file = "--ETCBINDIR--/scenari/$function.$name";
unless (open SCENARI,$scenario_file) {
do_log('err',"Unable to open scenario file
$function.$name, please report to listmaster") unless ($name =~ /\.header$/) ;
return &_load_scenario ($function,$robot,$name,'true()
smtp -> reject', $directory) unless ($function eq 'include');
@@ -8214,7 +8199,7 @@
my %list_of_scenario;
my %skip_scenario;

- foreach my $dir ("$directory/scenari", "$Conf{'etc'}/$robot/scenari",
"$Conf{'etc'}/scenari", "/home/sympa/bin/etc/scenari") {
+ foreach my $dir ("$directory/scenari", "$Conf{'etc'}/$robot/scenari",
"$Conf{'etc'}/scenari", "--ETCBINDIR--/scenari") {

next unless (-d $dir);

@@ -8261,7 +8246,7 @@
my $directory = "$self->{'dir'}";
my %list_of_task;

- foreach my $dir ("$directory/list_task_models",
"$Conf{'etc'}/$robot/list_task_models", "$Conf{'etc'}/list_task_models",
"/home/sympa/bin/etc/list_task_models") {
+ foreach my $dir ("$directory/list_task_models",
"$Conf{'etc'}/$robot/list_task_models", "$Conf{'etc'}/list_task_models",
"--ETCBINDIR--/list_task_models") {

next unless (-d $dir);

@@ -8323,7 +8308,7 @@
my $directory = "$self->{'dir'}";
my %list_of_data_sources;

- foreach my $dir ("$directory/data_sources",
"$Conf{'etc'}/$robot/data_sources", "$Conf{'etc'}/data_sources",
"/home/sympa/bin/etc/data_sources") {
+ foreach my $dir ("$directory/data_sources",
"$Conf{'etc'}/$robot/data_sources", "$Conf{'etc'}/data_sources",
"--ETCBINDIR--/data_sources") {

next unless (-d $dir);

@@ -10248,9 +10233,7 @@
sub get_lists {
my $robot_context = shift || '*';
my $options = shift;
- my $userlists = shift;

- do_log('info', 'List::get_lists(%s)',$robot_context);
my(@lists, $l,@robots);
do_log('debug2', 'List::get_lists(%s)',$robot_context);

@@ -10274,18 +10257,7 @@
do_log('err',"Unable to open $robot_dir");
return undef;
}
- my (@files, $len);
- if ( defined($userlists)){
- @files = sort @$userlists;
- $len = @files+0;
- &do_log('debug2', "we are using $len directories");
- }
- else {
- @files = sort readdir(DIR);
- $len = @files+0;
- &do_log('debug2', "we are using $len directories");
- }
- foreach my $l (@files) {
+ foreach my $l (sort readdir(DIR)) {
next if (($l =~ /^\./o) || (! -d "$robot_dir/$l") || (! -f
"$robot_dir/$l/config"));

my $list = new List ($l, $robot, $options);
@@ -10297,7 +10269,6 @@
}
closedir DIR;
}
-
return \@lists;
}

@@ -10492,23 +10463,12 @@

## WHICH in Database
my $db_which = {};
- my $all_lists;
+
if (defined $Conf{'db_type'} && $List::use_db) {
- $db_which = &get_which_db($email, $function);
- my @lists;
- foreach my $r (keys %{$db_which}){
- foreach my $l (keys %{$db_which->{$r}}){
- &do_log('debug2', "\$l is $l");
- push @lists, $l;
- }
- }
- $all_lists = &get_lists($robot, undef, \@lists);
- }
-
- unless (defined($all_lists)){
- $all_lists = &get_lists($robot);
+ $db_which = &get_which_db($email, $function);
}

+ my $all_lists = &get_lists($robot);
foreach my $list (@$all_lists){

my $l = $list->{'name'};
@@ -12394,7 +12354,7 @@
unless ($self && ($list_of_lists{$self->{'domain'}}{$self->{'name'}})
&& ($Conf{'sendmail_aliases'} !~ /^none$/i));

- my $alias_manager = '/home/sympa/bin/alias_manager/alias_manager.pl';
+ my $alias_manager = '--SBINDIR--/alias_manager.pl';

unless (-x $alias_manager) {
&do_log('err','Cannot run alias_manager %s', $alias_manager);
@@ -12535,130 +12495,6 @@
return $self->{'name'}.'@'.$self->{'domain'};
}

-
-
-sub get_list_names {
- my $robot_context = shift || '*';
- my $options = shift;
- my $userlists = shift;
- my(@lists, $l,@robots);
- do_log('debug2', 'List::get_lists(%s)',$robot_context);
- if ($robot_context eq '*') {
- @robots = &get_robots ;
- }else{
- push @robots, $robot_context ;
- }
- foreach my $robot (@robots) {
- my $robot_dir = $Conf{'home'}.'/'.$robot ;
- $robot_dir = $Conf{'home'} unless ((-d $robot_dir) || ($robot ne
$Conf{'host'}));
- unless (-d $robot_dir) {
- do_log('err',"unknown robot $robot, Unable to open $robot_dir");
- return undef ; }
- unless (opendir(DIR, $robot_dir)) {
- do_log('err',"Unable to open $robot_dir");
- return undef;
- }
- my (@files, $len);
- if ( defined($userlists)){
- @files = sort @$userlists;
- $len = @files+0;
- &do_log('debug2', "we are using $len directories");
- }
- else {
- @files = sort readdir(DIR);
- $len = @files+0;
- &do_log('debug2', "we are using $len directories");
- }
- foreach my $l (@files) {
- next if (($l =~ /^\./o) || (! -d "$robot_dir/$l") || (! -f
"$robot_dir/$l/config"));
- push @lists, $l;
- }
- }
- return @lists;
-}
-
-
-sub get_lists_db {
- my $statement = shift;
- return undef unless defined($statement);
- do_log('info', 'List::get_search_list_db(%s)', $statement);
-
- unless ($List::use_db) {
- &do_log('info', 'Sympa not setup to use DBI');
- return undef;
- }
-
- my ($l, @lists);
-
- ## Check database connection
- unless ($dbh and $dbh->ping) {
- return undef unless &db_connect();
- }
- push @sth_stack, $sth;
- &do_log('debug2','SQL: %s', $statement);
- unless ($sth = $dbh->prepare($statement)) {
- do_log('err','Unable to prepare SQL statement : %s', $dbh->errstr);
- return undef;
- }
- unless ($sth->execute) {
- do_log('err','Unable to execute SQL statement "%s" : %s',
$statement, $dbh->errstr);
- return undef;
- }
- while ($l = $sth->fetchrow_hashref) {
- my $name = $l->{'name_list'};
- push @lists, $name;
- }
- $sth->finish();
- $sth = pop @sth_stack;
-
- return \@lists;
-}
-
-sub _update_list_db
-{
- my ($self) = shift;
- my $statement = sprintf "SELECT COUNT(*) FROM list_table WHERE name_list
= %s AND robot_list = %s" , $dbh->quote($self->{'name'}),
$dbh->quote($self->{'admin'}{'host'});
- unless ($sth = $dbh->prepare($statement)) {
- do_log('err','Unable to prepare SQL statement : %s', $dbh->errstr);
- return undef;
- }
- my $ret;
- unless ($sth->execute) {
- do_log('err',"Unable to execute SQL statement '%s' : %s",
$statement, $dbh->errstr);
- return undef;
- }
-
- my $op = "UPDATE";
- my $set = "";
- my $ret = $sth->fetchrow_arrayref;
- $sth->finish;
- my $count = $ret->[0];
- unless ($count > 0)
- {
- $op = "INSERT INTO";
- $set = "";
- }
-
- my $name = $self->{'name'};
- my $subject = $self->{'admin'}{'subject'} || '';
- my $status = $self->{'admin'}{'status'};
- my $robot = $self->{'admin'}{'host'};
- my $web_archive = &is_web_archived($self) || 0;
-
- my $statement = sprintf "%s `list_table` %s SET status_list= %s,
name_list=%s, robot_list=%s, subject_list=%s, web_archive_list=%s ",$op,
$set, $dbh->quote($status), $dbh->quote($name), $dbh->quote($robot),
$dbh->quote($subject), $dbh->quote($web_archive);
- if ($op eq "UPDATE"){
- $statement .= sprintf " WHERE robot_list = %s AND name_list = %s ",
$dbh->quote($robot), $dbh->quote($name);
- }
-
- unless ($sth = $dbh->prepare($statement)) {
- do_log('err','Unable to prepare SQL statement : %s', $dbh->errstr);
- return undef;
- }
- unless ($sth->execute) {
- do_log('err','Unable to execute SQL statement "%s" : %s',
$statement, $dbh->errstr);
- }
- return 1;
-}
#################################################################

## Packages must return true.
--- /home/sympa/bin/sympa.pl 2007-07-27 01:45:03.000000000 -0700
+++ src/sympa-5.3.2/src/sympa.pl 2007-03-30 05:45:20.000000000 -0700
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#! --PERL--
# sympa.pl - This script is the main one ; it runs as a daemon and does
# the messages/commands processing
# RCS Identication ; $Revision: 4216 $ ; $Date: 2007-03-30 14:45:20 +0200
(ven, 30 mar 2007) $
@@ -23,7 +23,7 @@

use strict;

-use lib '/home/sympa/bin';
+use lib '--LIBDIR--';
#use Getopt::Std;
use Getopt::Long;

@@ -83,7 +83,6 @@
--service=process_command|process_message|process_creation : process
dedicated to messages distribution, commands or to automatic lists creation
(default three of them)
--dump=list\@dom|ALL : dumps subscribers
--make_alias_file : create file in /tmp with all
aliases (usefull when aliases.tpl is changed)
- --sync_db_list : Sync all lists to the database
--lowercase : lowercase email addresses in
database
--create_list --robot=robot_name --input_file=/path/to/file.xml
: create a list with the xml file
under robot_name
@@ -121,7 +120,7 @@
## Check --dump option
my %options;
unless (&GetOptions(\%main::options, 'dump=s', 'debug|d',
,'log_level=s','foreground', 'service=s','config|f=s',
- 'lang|l=s', 'mail|m', 'keepcopy|k=s', 'help', 'version',
'import=s','make_alias_file','lowercase', 'sync_db_list',
+ 'lang|l=s', 'mail|m', 'keepcopy|k=s', 'help', 'version',
'import=s','make_alias_file','lowercase',

'close_list=s','purge_list=s','create_list','instantiate_family=s','robot=s','add_list=s','modify_list=s','close_family=s','md5_digest=s',

'input_file=s','sync_include=s','upgrade','from=s','to=s','reload_list_config','list=s','quiet','close_unknown'))
{
&fatal_err("Unknown options.");
@@ -147,8 +146,7 @@
$main::options{'md5_digest'} ||
$main::options{'sync_include'} ||
$main::options{'upgrade'} ||
- $main::options{'reload_list_config'} ||
- $main::options{'sync_db_list'}
+ $main::options{'reload_list_config'}
);

# Some option force foreground mode
@@ -170,7 +168,7 @@

while ($signal ne 'term') { #as long as a SIGTERM is not received }

-my $config_file = $main::options{'config'} || '/etc/sympa/sympa.conf';
+my $config_file = $main::options{'config'} || '--CONFIG--';
## Load configuration file
unless (Conf::load($config_file)) {
&fatal_err("Configuration file $config_file has errors.");
@@ -333,15 +331,15 @@


# Set the UserID & GroupID for the process
- $( = $) = (getgrnam('sympa'))[2];
- $< = $> = (getpwnam('sympa'))[2];
+ $( = $) = (getgrnam('--GROUP--'))[2];
+ $< = $> = (getpwnam('--USER--'))[2];

## Required on FreeBSD to change ALL IDs(effective UID + real UID +
saved UID)
- &POSIX::setuid((getpwnam('sympa'))[2]);
- &POSIX::setgid((getgrnam('sympa'))[2]);
+ &POSIX::setuid((getpwnam('--USER--'))[2]);
+ &POSIX::setgid((getgrnam('--GROUP--'))[2]);

## Check if the UID has correctly been set (usefull on OS X)
- unless (($( == (getgrnam('sympa'))[2]) && ($< ==
(getpwnam('sympa'))[2])) {
+ unless (($( == (getgrnam('--GROUP--'))[2]) && ($< ==
(getpwnam('--USER--'))[2])) {
&fatal_err("Failed to change process userID and groupID. Note that on
some OS Perl scripts can't change their real UID. In such circumstances Sympa
should be run via SUDO.");
}

@@ -410,7 +408,7 @@
printf TMP "#\n#\tAliases for all Sympa lists open (but not for
robots)\n#\n";
close TMP;
foreach my $list (@$all_lists) {
- system ("/home/sympa/bin/alias_manager.pl add $list->{'name'}
$list->{'domain'} /tmp/sympa_aliases.$$") if ($list->{'admin'}{'status'} eq
'open');
+ system ("--SBINDIR--/alias_manager.pl add $list->{'name'}
$list->{'domain'} /tmp/sympa_aliases.$$") if ($list->{'admin'}{'status'} eq
'open');
}
printf ("Sympa aliases file is /tmp/sympa_aliases.$$ file made, you
probably need to installed it in your SMTP engine\n");

@@ -797,14 +795,6 @@

print STDOUT $string;
exit 0;
-}elsif ($main::options{'sync_db_list'}) {
- my $all_lists = &List::get_lists('*');
- foreach my $list (@$all_lists) {
- $list->_update_list_db ;
- }
-
-
- exit 0;
}


--- /home/sympa/bin/wwsympa.fcgi 2007-07-27 02:16:20.000000000 -0700
+++ src/sympa-5.3.2/wwsympa/wwsympa.fcgi 2007-05-09 06:20:09.000000000
-0700
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!--PERL-- --PERLOPT--

# wwsympa.fcgi - This script provides the web interface to Sympa
# RCS Identication ; $Revision: 4392 $ ; $Date: 2007-05-09 15:20:09 +0200
(mer, 09 mai 2007) $
@@ -40,7 +40,7 @@
=cut

## Change this to point to your Sympa bin directory
-use lib '/home/sympa/bin';
+use lib '--LIBDIR--';
use Getopt::Long;
use Archive::Zip;

@@ -49,7 +49,7 @@
use Text::Wrap;

## Template parser
-require "/home/sympa/bin/tt2.pl";
+require "--LIBDIR--/tt2.pl";

## Sympa API
use List;
@@ -69,8 +69,8 @@
use Mail::Header;
use Mail::Address;

-require "/home/sympa/bin/tools.pl";
-require "/home/sympa/bin/time_utils.pl";
+require "--LIBDIR--/tools.pl";
+require "--LIBDIR--/time_utils.pl";

## WWSympa librairies
use wwslib;
@@ -81,8 +81,8 @@
my $wwsconf = {};

## Change to your wwsympa.conf location
-my $conf_file = '/etc/sympa/wwsympa.conf';
-my $sympa_conf_file = '/etc/sympa/sympa.conf';
+my $conf_file = '--WWSCONFIG--';
+my $sympa_conf_file = '--CONFIG--';



@@ -612,11 +612,10 @@
my $birthday = time ;

## If using fast_cgi, it is usefull to initialize all list context
-#if ($wwsconf->{'use_fast_cgi'}) {
-
-# my $all_lists = &List::get_lists('*') unless ($maintenance_mode);
-#}
+if ($wwsconf->{'use_fast_cgi'}) {

+ my $all_lists = &List::get_lists('*') unless ($maintenance_mode);
+}

# Now internal encoding is same as input/output.
#XXX## Set output encoding
@@ -646,9 +645,9 @@
&Language::SetLang($Language::default_lang);

## Check effective ID
- unless ($> eq (getpwnam('sympa'))[2]) {
+ unless ($> eq (getpwnam('--USER--'))[2]) {

&report::reject_report_web('intern_quiet','incorrect_server_config',{},'','');
- &wwslog('err','Config error: wwsympa should run with UID %s (instead
of %s)', (getpwnam('sympa'))[2], $>);
+ &wwslog('err','Config error: wwsympa should run with UID %s (instead
of %s)', (getpwnam('--USER--'))[2], $>);
}

unless ($List::use_db = &List::check_db_connect()) {
@@ -7130,9 +7129,7 @@
return undef;
}

- my $statement = "SELECT `name_list` FROM `list_table` WHERE
`status_list` = 'pending'";
- my @lists = &List::get_lists_db($statement);
- my $all_lists = &List::get_lists($robot, undef, @lists);
+ my $all_lists = &List::get_lists($robot);
foreach my $list ( @$all_lists ) {
if ($list->{'admin'}{'status'} eq 'pending') {
$param->{'pending'}{$list->{'name'}}{'subject'} =
$list->{'admin'}{'subject'};
@@ -7161,9 +7158,7 @@
return undef;
}

- my $statement = "SELECT `name_list` FROM `list_table` WHERE
`status_list` = 'closed' OR `status_list` = 'family_closed'";
- my @lists = &List::get_lists_db($statement);
- my $all_lists = &List::get_lists($robot, undef, @lists);
+ my $all_lists = &List::get_lists($robot);
foreach my $list ( @$all_lists ) {
if ($list->{'admin'}{'status'} eq 'closed' ||
$list->{'admin'}{'status'} eq 'family_closed') {
@@ -7230,11 +7225,7 @@
}

my @unordered_lists;
- ## [XXX] TODO: Select only lists that are not closed
- my $statement = sprintf "SELECT name_list FROM list_table WHERE
status_list = 'closed'";
- my @lists = &List::get_lists_db($statement);
-
- my $all_lists = &List::get_lists($robot, undef, \@lists);
+ my $all_lists = &List::get_lists($robot);
foreach my $list ( @$all_lists ) {

## skip closed lists
@@ -7897,9 +7888,9 @@
&wwslog('info', 'do_scenario_test');

## List available scenarii
- unless (opendir SCENARI, "/home/sympa/bin/etc/scenari/"){
- &report::reject_report_web('intern','cannot_open_dir',{'dir' =>
"/home/sympa/bin/etc/scenari/"},$param->{'action'},$list,$param->{'user'}{'email'},$robot);
- &wwslog('info',"do_scenario_test : unable to open
/home/sympa/bin/etc/scenari");
+ unless (opendir SCENARI, "--ETCBINDIR--/scenari/"){
+ &report::reject_report_web('intern','cannot_open_dir',{'dir' =>
"--ETCBINDIR--/scenari/"},$param->{'action'},$list,$param->{'user'}{'email'},$robot);
+ &wwslog('info',"do_scenario_test : unable to open
--ETCBINDIR--/scenari");
return undef;
}

@@ -8198,10 +8189,7 @@
return undef;
}

- ## [XXX] TODO: Select only lists configured with web_archive
- my $statement = "SELECT `name_list` FROM `list_table` WHERE
`web_archive_list` is TRUE";
- my @lists = &List::get_lists_db($statement);
- my $all_lists = &List::get_lists($robot, undef, @lists);
+ my $all_lists = &List::get_lists($robot);
foreach my $list ( @$all_lists ) {
next unless (defined $list->{'admin'}{'web_archive'});
my $file = $Conf{'queueoutgoing'}.'/.rebuild.'.$list->get_list_id();
@@ -8245,14 +8233,12 @@

## Members list
my $record = 0;
- my $regexp = $param->{'regexp'};
- my $statement = sprintf "SELECT name_list FROM list_table WHERE
name_list RLIKE '%s' OR subject_list RLIKE '%s'", $regexp, $regexp;
- my @lists = &List::get_lists_db($statement) || undef;
- my $all_lists = &List::get_lists($robot,undef, @lists);
+ my $all_lists = &List::get_lists($robot);
foreach my $list ( @$all_lists ) {
my $is_admin;
## Search filter
- my $regtest = eval { (($list->{'name'} !~ /$param->{'regexp'}/i) &&
($list->{'admin'}{'subject'} !~ /$param->{'regexp'}/i)) };
+ my $regtest = eval { (($list->{'name'} !~ /$param->{'regexp'}/i)
+ && ($list->{'admin'}{'subject'} !~
/$param->{'regexp'}/i)) };
unless (defined($regtest)) {
&report::reject_report_web('user','syntax_errors',{'params' =>
'filter'},$param->{'action'});
&wwslog('err','do_search_list: syntax error');
@@ -15933,7 +15919,7 @@
sub do_wsdl {

&wwslog('info', "do_wsdl ()");
- my $sympawsdl = '/home/sympa/bin/etc/sympa.wsdl';
+ my $sympawsdl = '--ETCBINDIR--/sympa.wsdl';

unless (-r $sympawsdl){
&report::reject_report_web('intern','err_404',{},$param->{'action'});
@@ -15953,7 +15939,7 @@

$param->{'conf'}{'soap_url'} = $soap_url;

- &tt2::parse_tt2($param, 'sympa.wsdl' , \*STDOUT,
['/home/sympa/bin/etc']);
+ &tt2::parse_tt2($param, 'sympa.wsdl' , \*STDOUT, ['--ETCBINDIR--']);

# unless (open (WSDL,$sympawsdl)) {
# &error_message('404');
--- /home/sympa/etc/script/create_db.mysql 2007-07-27 02:38:48.000000000
-0700
+++ src/sympa-5.3.2/src/etc/script/create_db.mysql 2006-08-02
06:56:22.000000000 -0700
@@ -78,15 +78,3 @@
PRIMARY KEY (id_logs)
);

-CREATE TABLE list_table (
- name_list varchar(100) NOT NULL default '',
- path_list varchar(100) NOT NULL default '',
- robot_list varchar(100) NOT NULL default '',
- status_list
enum('open','closed','pending','error_config','family_closed') NOT NULL
default 'closed',
- creation_email_list varchar(100) NOT NULL default '',
- creation_epoch_list datetime default NULL,
- subject_list varchar(100) NOT NULL default '',
- web_archive_list tinyint(1) NOT NULL default '0',
- PRIMARY KEY (name_list,robot_list)
-);
-
--- /home/sympa/etc/script/create_db.Pg 2007-07-27 02:42:51.000000000 -0700
+++ src/sympa-5.3.2/src/etc/script/create_db.Pg 2006-08-02 06:56:22.000000000
-0700
@@ -84,16 +84,3 @@
CONSTRAINT ind_logs PRIMARY KEY (id_logs)
);
CREATE INDEX logs_idx ON logs_table(id_logs);
-
-CREATE TABLE list_table (
- name_list varchar(100) NOT NULL,
- path_list varchar(100) NOT NULL,
- robot_list varchar(100) NOT NULL,
- status_list
enum('open','closed','pending','error_config','family_closed') NOT NULL,
- creation_email_list varchar(100) NOT NULL,
- creation_epoch_list datetime ,
- subject_list varchar(100) NOT NULL,
- web_archive_list tinyint(1) NOT NULL,
- CONSTRAINT ind_list PRIMARY KEY (name_list,robot_list)
-);
-CREATE INDEX list_idx ON list_table(name_list, robot_list);


  • [sympa-dev] Storing / Retrieving List Information with SQL, epsas, 07/27/2007

Archive powered by MHonArc 2.6.19+.

Top of Page