0
votes

I've problems using type boolean in SQLite. The error-message is:

Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Unknown database type bool requested, Doctrine\DBAL\Platforms\SqlitePlatform may not support it.'

The error happens on connecting to SQLite database. The database-schema is just the default from here: https://doc.powerdns.com/md/authoritative/backend-generic-sqlite/

How can I solve this? I didn't find something on Google/Stackoverflow.

2
If you vote down my question please tell me why so that I can explain what's unclear and add missing informations! thanks! - SebTM

2 Answers

1
votes

You're using Doctrine, so you should also use it to set up the database structure for you. So instead of running these "Create table" statements yourself, use the solution below, which applies to your use case.

If you're using Doctrine ORM set up your entity classes as described here: Basic Mapping

If you're using Doctrine DBAL without the ORM, you should set up the database structure like this: Schema-Representation

0
votes

According to Doctrine\DBAL\Platforms\SqlitePlatform API, boolean type is defined as 'BOOLEAN' (I am sure it is case insensitive) not 'bool'.