Topic on User talk:Shirayuki

Xxmarijnw (talkcontribs)

Hi Shirayuki! I saw you reverted by edit on Manual:Schema changes with the summary "boolean unused". I am not sure what you mean by this, as using "boolean" as the type in an abstract schema does work and results in the equivalents detailed in my edit. Could you explain what you mean?

Shirayuki (talkcontribs)
Shirayuki (talkcontribs)

"generateSchemaSql.php" does not support "boolean"!

It shows the following error message:

Does not have a value in the enumeration ["bigint","binary","blob","datetimetz","float","integer","mwenum","mwtimestamp","mwtinyint","smallint","string","text"]
Xxmarijnw (talkcontribs)

Thank you, I will update my schema to use an mwtinyint of length 1.

Xxmarijnw (talkcontribs)

Hi Shirayuki, I tried to use the type mwtinyint in my abstract schema, but that gave me the following exception:

Doctrine\DBAL\Exception from line 125 of /Users/xxmarijnwwerk/Documents/Wikis/mediawiki-1.35.6-permissions/vendor/doctrine/dbal/src/Exception.php: Unknown column type "mwtinyint" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapping information.
#0 /Users/xxmarijnwwerk/Documents/Wikis/mediawiki-1.35.6-permissions/vendor/doctrine/dbal/src/Types/TypeRegistry.php(37): Doctrine\DBAL\Exception::unknownColumnType('mwtinyint')
#1 /Users/xxmarijnwwerk/Documents/Wikis/mediawiki-1.35.6-permissions/vendor/doctrine/dbal/src/Types/Type.php(143): Doctrine\DBAL\Types\TypeRegistry->get('mwtinyint')
#2 /Users/xxmarijnwwerk/Documents/Wikis/mediawiki-1.35.6-permissions/vendor/doctrine/dbal/src/Schema/Table.php(353): Doctrine\DBAL\Types\Type::getType('mwtinyint')
#3 /Users/xxmarijnwwerk/Documents/Wikis/mediawiki-1.35.6-permissions/includes/libs/rdbms/database/DoctrineSchemaBuilder.php(34): Doctrine\DBAL\Schema\Table->addColumn('rule_consequent', 'mwtinyint', Array)
#4 /Users/xxmarijnwwerk/Documents/Wikis/mediawiki-1.35.6-permissions/maintenance/generateSchemaSql.php(71): Wikimedia\Rdbms\DoctrineSchemaBuilder->addTable(Array)
#5 /Users/xxmarijnwwerk/Documents/Wikis/mediawiki-1.35.6-permissions/maintenance/doMaintenance.php(107): GenerateSchemaSql->execute()
#6 /Users/xxmarijnwwerk/Documents/Wikis/mediawiki-1.35.6-permissions/maintenance/generateSchemaSql.php(117): require_once('/Users/xxmarijn...')
#7 {main}

I am using MediaWiki 1.35.6 with the maintenance/generateSchemaSql.php script. Do you know why this might be going wrong?

Shirayuki (talkcontribs)
Reply to "Boolean unused"