Apps not working, PDO and DBAL exceptions on clean NC13 install

I have no idea why this isn’t working. Any help would be greatly appreciated.

On a clean FreeBSD 11.2 install with a clean Apache 2.4, NC13.0.6 initially appears to install correctly. I can log in as admin, navigate around settings, create users, and upload files. However Contacts can’t create an addressbook (“import is disabled because no writable addressbook could be found”) and Calendar can’t create calendars (just spinning circles).

When I log in as a non-admin, things usually work, but with the occasional “Internal Server Error”. I hit back, and things start working again.

I’ve tried various combinations of MySQL 8.0 and 5.7 with PHP 7.1 and 7.2 and still had this issue. My log indicates there’s error between PHP and MySQL, but I have no idea how to fix it. I do have php71-pdo_mysql installed.

Below is the fatal webdav error from my log. I’ve been struggling with this longer than I like to admit, does anyone have a clue what’s wrong?

Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT `displayname`, `description`, `timezone`, `calendarorder`, `calendarcolor`, `id`, `uri`, `synctoken`, `components`, `principaluri`, `transparent` FROM `oc_calendars` WHERE `principaluri` = ? ORDER BY `calendarorder` ASC' with params ["principals\/users\/fnord"]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud_db.oc_calendars' doesn't exist

0.    /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128: Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
1.    /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 855: Doctrine\DBAL\DBALException driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'SELECT `display...', Array)
2.    /usr/local/www/nextcloud/lib/private/DB/Connection.php - line 195: Doctrine\DBAL\Connection->executeQuery('SELECT `display...', Array, Array, NULL)
3.    /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 206: OC\DB\Connection->executeQuery('SELECT `display...', Array, Array)
4.    /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 214: Doctrine\DBAL\Query\QueryBuilder->execute()
5.    /usr/local/www/nextcloud/apps-pkg/dav/lib/CalDAV/CalDavBackend.php - line 264: OC\DB\QueryBuilder\QueryBuilder->execute()
6.    /usr/local/www/nextcloud/apps-pkg/dav/lib/CalDAV/CalendarHome.php - line 76: OCA\DAV\CalDAV\CalDavBackend->getCalendarsForUser('principals/user...')
7.    /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 195: OCA\DAV\CalDAV\CalendarHome->getChildren()
8.    /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 899: Sabre\DAV\Tree->getChildren('calendars/fnord')
9.    /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 978: Sabre\DAV\Server->generatePathNodes(Object(Sabre\DAV\PropFind), Array)
10.    /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1666: Sabre\DAV\Server->getPropertiesIteratorForPath('calendars/fnord', Array, 1)
11.    /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 359: Sabre\DAV\Server->generateMultiStatus(Object(Generator), false)
12.    [internal function] Sabre\DAV\CorePlugin->httpPropFind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
13.    /usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
14.    /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PROPFIND', Array)
15.    /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
16.    /usr/local/www/nextcloud/apps-pkg/dav/lib/Server.php - line 293: Sabre\DAV\Server->exec()
17.    /usr/local/www/nextcloud/apps-pkg/dav/appinfo/v2/remote.php - line 35: OCA\DAV\Server->exec()
18.    /usr/local/www/nextcloud/remote.php - line 164: require_once('/usr/local/www/...')
19.    {main}