<?php
  /*

      upgrade.1.0.inc.php

      Upgrades database to v.1.0

      Changelog:
        2005-07-15 arne_sf: Buffers output in array instead of displaying it immediately
        2005-07-15 arne_sf: Initial version, including database schema changes by Stephan Kaufhold
        
      ----

      Copyright (C) 2005  Arne (arne_sf@users.sourceforge.net)

      This program is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation version 2.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

  */
      
    // Initialize array (important!)
    $qry = array();
    // Add 'tbl_files' table 
    $output[] = "Adding table 'tbl_Assets' ....... ";
    $qry['pgsql'] = "
      CREATE TABLE tbl_assets (
      );";
    $qry['mysql'] = "
      CREATE TABLE `tbl_Assets` (
      );";
    $qry['mssql'] = "";
    if ($qry[$db->phptype] != "") 
    {
        $res = $db->query($qry[$db->phptype]);
        $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n";
    } else $output[] = "ERROR: DBMS " . $db->phptype . " not yet supported by the upgrade routine!<BR />\n";

?>
