wiki.techinc.nl/maintenance/archives/patch-rev_text_id-default.sql
addshore 8d15ade672 Add default for revision.rev_text_id where missing
This adds a default of 0 for:
 - Mssql
 - Mysql
 - Sqlite

The field is already NULLable in:
 - Oracle
 - Postgres

Bug: T188741
Change-Id: Ibe1cc363d21fb96f38c263181bf30a429a1c7b45
2018-03-19 18:20:27 +00:00

10 lines
No EOL
320 B
SQL

--
-- Adds a default value to the rev_text_id field in the revision table.
-- This is to allow the Multi Content Revisions migration to happen where
-- rows will have to be added to the revision table with no rev_text_id.
--
-- 2018-03-12
--
ALTER TABLE /*$wgDBprefix*/revision
ALTER COLUMN rev_text_id SET DEFAULT 0;