<?php
	# Mantis - a php based bugtracking system
	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
	# This program is distributed under the terms and conditions of the GPL
	# See the README and LICENSE files for details

	# Changes applied to 0.18 database

	# --------------------------------------------------------
	# $Id: 0_19_inc.php,v 1.1 2004/10/05 17:20:33 thraxisp Exp $
	# --------------------------------------------------------
?>
<?php
	require_once( 'db_table_names_inc.php' );

	$upgrades = array();

	$upgrades[] = new SQLUpgrade(
			'0.19.1.user_custom.1',
			'Add User_Custom_Field_Table',
			"CREATE TABLE $t_custom_field_user_table (
  			 field_id int NOT NULL default '0',
  			 sequence int NOT NULL default '0',
  			 PRIMARY KEY  (field_id))"
			);

	$upgrades[] = new SQLUpgrade(
			'0.19.1.user_custom.2',
			'Add User_Custom_Field_String_Table',
			"CREATE TABLE $t_custom_field_user_string_table (
  			field_id int NOT NULL default '0',
  			user_id int NOT NULL default '0',
  			value varchar(255) NOT NULL default '',
  			PRIMARY KEY  (field_id,user_id))"
			);
      
  	$upgrades[] = new SQLUpgrade(
			'0.19.2.user_custom.3',
			'Add field User_Custom_Field_Table',
			"ALTER TABLE $t_custom_field_table 
      ADD `access_level_rwc` INT(2)  UNSIGNED DEFAULT \"0\" NOT NULL"
			);

	return $upgrades;
?>
