Page MenuHomePhabricator

Work around an issue in MariaDB where dropping a column from a UNIQUE KEY fails
ClosedPublic

Authored by epriestley on Aug 30 2018, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 10:33 PM
Unknown Object (File)
Wed, Dec 18, 5:26 AM
Unknown Object (File)
Sat, Dec 7, 10:28 AM
Unknown Object (File)
Mon, Dec 2, 2:15 PM
Unknown Object (File)
Sat, Nov 30, 12:10 PM
Unknown Object (File)
Thu, Nov 28, 1:24 AM
Unknown Object (File)
Nov 23 2024, 6:22 AM
Unknown Object (File)
Nov 20 2024, 8:23 AM
Subscribers
Restricted Owners Package

Details

Summary

See T13193. See T13077. If we drop a column which is part of a UNIQUE KEY, MariaDB raises an error.

This is probably a bad idea on our side anyway, but in this case it wasn't an obviously bad idea.

To get around this:

  • Drop the unique key, if it exists, before dropping the column.
  • Explicitly add the new unique key afterward.
Test Plan

Ran bin/storage upgrade locally without issue, but I'm on MySQL. Will follow up on T13193.

Diff Detail

Repository
rP Phabricator
Branch
phriction8
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20714
Build 28157: Run Core Tests
Build 28156: arc lint + arc unit