root/vtigercrm/branches/4.2/extractSchema.php

Revision 3915, 0.7 kB (checked in by mfedyk, 5 years ago)

remove unused code in extractSchema

Line 
1 <?php
2 set_time_limit(600);
3
4 require_once('include/database/PearDatabase.php');
5
6 require_once('config.php');
7
8 $conn = ADONewConnection($dbconfig['db_type']);
9 $conn->Connect(
10     $dbconfig['db_hostname'],
11     $dbconfig['db_username'],
12     $dbconfig['db_password'],
13     $dbconfig['db_name']);
14
15
16 $schema = new adoSchema( $conn );
17 $schema->XMLS_DEBUG = true;
18
19 //Get schema without data
20 $xmlresult = $schema->ExtractSchema(false);
21 header("content-type: text/plain");
22 #echo "abcd";
23
24 if (!$schemaFile = fopen("schema/DatabaseSchema.xml", w)) {
25     echo "Cannot open file ($filename)";
26     exit;
27 }
28
29 if (fwrite($schemaFile, $xmlresult) === FALSE) {
30     echo "Cannot write to file ($schemaFile)";
31     exit;
32 }
33
34 echo $xmlresult;
35
Note: See TracBrowser for help on using the browser.