#!/usr/bin/perl -w
# Adds address book table for MySQL/PGSQL .. CSV users don't need to run this.
# run from cscmail dir like this ./migration-scripts/mkaddbtable.pl
BEGIN {
$libpath = $0;
$libpath =~ s!/[^/]+$!!;
$libpath =~ s!/bin$!/lib/cscmail!;
if (! -e $libpath) { die "Can't find required files in $libpath"; };
}
use lib "$libpath";
use lib "$libpath/modules/lib/perl5/site_perl/5.005";
use DBI;
require 'csclib.pl';
&read_prefs;
my $dbh=&open_db_conn;
$sth1 = $dbh->prepare("create table addresses(id INT, alias TEXT, address TEXT, public_key TEXT)");
$sth1->execute;
syntax highlighted by Code2HTML, v. 0.9.1