 /******************************************************************************/
 ---# Adding support for <credits> tag in package manager
 ALTER TABLE {$db_prefix}log_packages
-ADD COLUMN credits TEXT NOT NULL;
+ADD COLUMN IF NOT EXISTS credits TEXT NOT NULL;
 ---#
 
 ---# Adding support for package hashes
 ALTER TABLE {$db_prefix}log_packages
-ADD COLUMN sha256_hash TEXT;
+ADD COLUMN IF NOT EXISTS sha256_hash TEXT;
 ---#
 
 ---# Adding support for validation servers
 ALTER TABLE {$db_prefix}package_servers
-ADD COLUMN validation_url VARCHAR(255) DEFAULT '',
-ADD COLUMN extra TEXT;
+ADD COLUMN IF NOT EXISTS validation_url VARCHAR(255) DEFAULT '',
+ADD COLUMN IF NOT EXISTS extra TEXT;
 ---#
 
 ---# Add Package Validation to Downloads Site

/******************************************************************************/
---# Adding the count to the members table...
ALTER TABLE {$db_prefix}members
ADD COLUMN alerts int NOT NULL default '0';
---#

---# Adding the new table for alerts.

/******************************************************************************/
---# Adding new field_order column...
ALTER TABLE {$db_prefix}custom_fields
ADD COLUMN IF NOT EXISTS field_order smallint NOT NULL default '0';
---#

---# Adding new show_mlist column...
ALTER TABLE {$db_prefix}custom_fields
ADD COLUMN IF NOT EXISTS show_mlist smallint NOT NULL default '0';
---#

---# Insert fields
