Page MenuHomePhabricator

AddTermSearchKey.sql fails on sqlite
Closed, ResolvedPublic

Description

Adding term_search_key field to table wb_terms ...A database query syntax error has occurred.
The last attempted database query was:
"alter table wb_terms add column term_search_key TEXT NOT NULL
"
from within function "DatabaseBase::sourceFile( /DATA/var/www/daniel/wikidata/extensions/Wikibase/repo/includes/store/sql/AddTermsSearchKey.sql )".
Database returned error "1: Cannot add a NOT NULL column with default value NULL"
Backtrace:
#0 /DATA/var/www/daniel/wikidata/includes/db/Database.php(981): DatabaseBase->reportQueryError('Cannot add a NO...', 1, 'alter table wb_...', 'DatabaseBase::s...', false)
#1 /DATA/var/www/daniel/wikidata/includes/db/Database.php(3388): DatabaseBase->query('alter table wb_...', 'DatabaseBase::s...')
#2 /DATA/var/www/daniel/wikidata/includes/db/Database.php(3301): DatabaseBase->sourceStream(Resource id #103, false, false, 'DatabaseBase::s...', false)
#3 /DATA/var/www/daniel/wikidata/includes/installer/DatabaseUpdater.php(578): DatabaseBase->sourceFile('/DATA/var/www/d...')
#4 /DATA/var/www/daniel/wikidata/includes/installer/DatabaseUpdater.php(614): DatabaseUpdater->applyPatch('/DATA/var/www/d...', true, 'Adding term_sea...')
#5 [internal function]: DatabaseUpdater->addField('wb_terms', 'term_search_key', '/DATA/var/www/d...', true)
#6 /DATA/var/www/daniel/wikidata/includes/installer/DatabaseUpdater.php(389): call_user_func_array(Array, Array)
#7 /DATA/var/www/daniel/wikidata/includes/installer/DatabaseUpdater.php(346): DatabaseUpdater->runUpdates(Array, true)
#8 /DATA/var/www/daniel/wikidata/maintenance/update.php(151): DatabaseUpdater->doUpdates(Array)
#9 /DATA/var/www/daniel/wikidata/maintenance/doMaintenance.php(110): UpdateMediaWiki->execute()
#10 /DATA/var/www/daniel/wikidata/maintenance/update.php(193): require_once('/DATA/var/www/d...')
#11 {main}


Version: unspecified
Severity: normal

Details

Reference
bz42688

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:46 AM
bzimport set Reference to bz42688.
bzimport added a subscriber: Unknown Object (MLST).
daniel created this task.Dec 4 2012, 3:33 PM

Verified in Wikidata demo sprint 30

Restricted Application added a project: Wikidata. · View Herald TranscriptMay 19 2017, 8:21 AM