Code:
#!/usr/local/bin/perl -w
use lib '/admin';
use Links qw/$DB/;
Links::init('/admin');
my $c = $DB->creator('linktest');
$c->cols([
rl_id => { type => 'INT', not_null => 1 },
rl_url => { type => 'CHAR', size => 255 },
retail_id_fk => { type => 'INT', not_null => 1 },
link_id_fk => { type => 'INT', not_null => 1}
]);
$c->pk('rl_id'); # Set primary key
$c->ai('rl_id'); # Make it auto incremenet
$c->index({
retail_ndx => ['retail_id_fk'],
link_ndx => ['link_id_fk']
}); # Setup indexes for faster searches
$c->fk({
Links => { ID => 'link_id_fk' },
Retailers => { retail_id => 'rl_id' },
}); # Setup foreign keys
$c->create or die "Create failed: $GT::SQL::error";
when i click
http://mydomain.com/admin/admin.cgi
and
http://mydomain.com/admin/admin.cgi?page=db.html
normally the newly created table will apppeared in teh drop down list there
so i could manipulate it accordingly (do the Table Maintenance for add new column change column properties
and the def file will be updated by the system)
Now i found the table was setted up in the database already. and the glink_linktest.def has beed created too
i also do the Resync . but i did not see table "linktest" appeared in the dropped down list in editor window.
(http://mydomain.com/admin/admin.cgi?page=db.html)
i suspect i have mess up somthing or miss some prodedure .