error_reporting(E_ALL); ini_set("display_errors", 1); include_once realpath(__DIR__ . '/../output/Saida.php'); //include_once realpath ( __DIR__ . '/../bo/sequence/GerenciadorSequence.php' ); function __autoload($classe) { if (file_exists(__DIR__ . "/../bo/{$classe}.php")) { include_once __DIR__ . "/../bo/{$classe}.php"; } } if (isset($argv[1])) { $empresa = $argv[1]; $cmd = true; } elseif (isset($_GET['empresa'])) { $empesa = $_GET['empresa']; $cmd = false; } else { $empresa = "test"; $cmd = false; } $saida = new Saida($empresa, $cmd); $saida->open(); $estrutura = $saida->estrutura(); $schema = new SchemaBO($empresa, $estrutura); $saida->gravarDataBase(); $saida->gravar($schema->listarDev()); $saida->gravar($schema->listarHomolog()); $saida->gravar($schema->dropSchema()); $saida->gravar($schema->createSchema()); $saida->gravar($schema->alterSchema()); $saida->fecha();
} } if (isset($argv[1])) { $empresa = $argv[1]; $cmd = true; } elseif (isset($_GET['empresa'])) { $empesa = $_GET['empresa']; $cmd = false; } else { $empresa = "teste"; $cmd = false; } $saida = new Saida($empresa, $cmd); $saida->open(); //$propriedades = array(new Padrao($array), new Nulo($array)); $schema = new SchemaBO($empresa); $saida->gravarDataBase(); $saida->gravar($schema->listarDev()); $saida->gravar($schema->listarHomolog()); $saida->gravar($schema->dropSchema()); //$saida->gravar ( $schema->createSchemaHomolog () ); //$schemasCreateTableArray = $schema->createSchemaArray(); $saida->gravar($schema->createSchema()); $saida->gravar($schema->alterSchema()); echo "<pre>"; //print_r ( GerenciadorSequence::getCriados() ); print_r($schema->intersect_homolog_devQuery()); echo "</pre>"; /* foreach ( $schemasCreateTableArray as $schemaNome ) { $sequence = new SequenceBO ( $empresa, $schemaNome );
include_once __DIR__ . "/../bo/{$classe}.php"; } } if (isset($argv[1])) { $empresa = $argv[1]; $cmd = true; } elseif (isset($_GET['empresa'])) { $empesa = $_GET['empresa']; $cmd = false; } else { $empresa = "teste"; $cmd = false; } $saida = new Saida($empresa, $cmd); $saida->open(); $schema = new SchemaBO($empresa); $schemasArray = $schema->arrayHomolog(); $sequence = new SequenceBO($empresa); $saida->gravarDataBase(); $saida->gravar($schema->listarDev()); $saida->gravar($schema->listarHomolog()); $saida->gravar($schema->dropSchemaHomolog()); $saida->gravar($schema->createSchemaHomolog()); echo "<pre>"; // print_r($schema->dropSchemaHomolog()); // print_r($schema->arrayHomolog()); echo "</pre>"; $saida->gravar($sequence->dropSequenceHomolog()); foreach ($schemasArray as $schemaNome) { $saida->gravar($schema->setSchema($schemaNome)); $tabela = new TabelaBO($empresa, $schemaNome);
$cmd = true; if (isset($argv[2])) { $connection = $argv[2]; } } elseif (isset($_GET['empresa'])) { $dbCompany = $_GET['empresa']; if (isset($_GET['connection'])) { $connection = $_GET['connection']; } $cmd = false; } else { $dbCompany = "test"; $cmd = false; } $saida = new Saida($dbCompany, $cmd, $connection); $schema = new SchemaBO(); $sequence = new SequenceBO(); $funcao = new FuncaoBO(); $tabela = new TabelaBO(); $trigger = new TriggerBO(); $indice = new IndiceBO(); $coluna = new ColunaBO(); $constraint = new ConstraintBO(); /* AssemblerBO::devTree(); AssemblerBO::homologTree(); $saida->gravar($schema->listar()); $saida->gravar($sequence->listar()); $saida->gravar($funcao->listar()); $saida->gravar($tabela->listar());