discourse-legacysite-perl/site/slowtwitch.com/cgi-bin/articles/admin/create_table.pl
2024-06-17 21:49:12 +10:00

33 lines
843 B
Perl

#!/usr/local/bin/perl
use strict;
use lib '/var/home/slowtwitch/slowtwitch.com/cgi-bin/articles/admin';
use Links qw/:objects/;
$| = 1;
local $SIG{__DIE__} = \&Links::fatal;
Links::init('/var/home/slowtwitch/slowtwitch.com/cgi-bin/articles/admin');
Links::init_admin();
main();
sub main {
# ------------------------------------------------------------------
# Main admin loop, displays html pages and other admin tasks.
#
my $c = $DB->creator('ClickTrack_Custom');
$c->cols( {
click_id => { pos => 1, type => 'INT', not_null => 1 },
click_date => { pos => 2, type => 'Date', not_null => 1 },
click_linkid => { pos => 3, type => 'INT', not_null => 1 },
});
$c->pk('click_id');
$c->ai('click_id');
$c->fk( {
'Links' => { click_linkid => 'ID' }
});
my $res = $c->create();
}