The best way to restore the co-domain record is:
1) Mkae a backup af your current ispconfig database, especially of the doctype table.
2) have a look at the doctype table and delete the row were doctype_id = 1015
3) Download the ispconfig installer tar.gz file from sourceforge, it must be the same version of ispconfig as the one that you have installed, unpack it and have a look at the file install_ispconfig/db_ispconfig.sql with an editor. It contains the complete sql dump of a freshly installed database. Search for the row of the doctype table with doctype_id 1015 and execute this one sql command in your ispconfig database.
PS: how can i have new sites generate certain co-domains automatically? it looks like this is the right place to edit, for example, how ispconfig automatically adds a blank co-domain record?
Have a look at the file /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_web.lib.php