# -*- Mode:perl -*-

use strict;

use ARDB::Test;

$ARDB::DEBUG = 1;

my $replace_flag = 1;

use ARDB;

my $ardb_object = new ARDB 'home' ;

my $sql_object = $ardb_object -> {sql_object};

my $relations_object = $ardb_object -> {relations};

$relations_object -> delete_table  if ( $replace_flag );
$relations_object -> create_table;

foreach my $table_ref ( values %{ $ardb_object -> {config} -> {tables} } )  {
  print $table_ref -> {name}, " ($table_ref)\n";
  $table_ref -> perform_delete ( $sql_object )
    if ( $replace_flag );
  $table_ref -> perform_create ( $sql_object );
  print "created ", $table_ref->{name}, "\n";
}

ok;

