So I built a quick shell script that allows me to rebuild the entire database structure, and ignore the data in the tables of the database that I customized. That way the customized tables will not be imported, just their structure; just because the initial errors I was getting were related to the "lists" and "form" related tables in the database, as those were the ones I had customized.
#!/bin/bash
PASSWORD="password"
HOST=localhost
USER=osticket
DATABASE=osticket
DB_FILE=dump.sql
EXCLUDED_TABLES=(
ost_form
ost_form_entry
ost_form_entry_values
ost_form_field
ost_help_topic_form
ost_list
ost_list_items
)
IGNORED_TABLES_STRING=''
for TABLE in "${EXCLUDED_TABLES[@]}"
do :
IGNORED_TABLES_STRING+=" --ignore-table=${DATABASE}.${TABLE}"
done
echo "Dump structure"
mysqldump --host=${HOST} --user=${USER} --password=${PASSWORD} --single-transaction --no-data --routines ${DATABASE} > ${DB_FILE}
echo "Dump content"
mysqldump --host=${HOST} --user=${USER} --password=${PASSWORD} ${DATABASE} --no-create-info --skip-triggers ${IGNORED_TABLES_STRING} >> ${DB_FILE}
So I did that, exported the database, then uploaded it and now I got different errors:
PHP Fatal error: Uncaught exception 'DoesNotExist' in /var/www/html/osticket/upload/include/class.orm.php:1343\nStack trace:\n
#0 /var/www/html/osticket/upload/include/class.dynamic_forms.php(483): QuerySet->one()\n
#1 /var/www/html/osticket/upload/include/class.dynamic_forms.php(478): TicketForm::getNewInstance()\n
#2 /var/www/html/osticket/upload/include/class.ticket.php(2190): TicketForm::getInstance()\n
#3 /var/www/html/osticket/upload/include/class.queue.php(343): Ticket::getSearchableFields()\n
#4 /var/www/html/osticket/upload/include/class.queue.php(309): CustomQueue::getSearchableFields('Ticket')\n
#5 /var/www/html/osticket/upload/include/class.queue.php(884): CustomQueue->getSupportedMatches()\n
#6 /var/www/html/osticket/upload/include/class.queue.php(819): CustomQueue->mangleQuerySet(Object(QuerySet))\n
#7 /var/www/html/osticket/upload/include/class.queue.php(832): CustomQueue->getBasicQuery(false)\n
#8 /var/www/html/osticket/upload/scp/tickets.php(531): CustomQueue->getQuery(false, NULL)\n
#9 /var/www/html/osticket/upload/scp/index.php in /var/www/html/osticket/upload/include/class.orm.php on line 1343, referer: http://ops.nhsocal.com/scp/upgrade.php?c=4&r=21
Any ideas? What 'DoesNotExist'?