Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15371016
D21265.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21265.diff
View Options
diff --git a/src/applications/config/schema/PhabricatorConfigColumnSchema.php b/src/applications/config/schema/PhabricatorConfigColumnSchema.php
--- a/src/applications/config/schema/PhabricatorConfigColumnSchema.php
+++ b/src/applications/config/schema/PhabricatorConfigColumnSchema.php
@@ -68,6 +68,37 @@
return $this->characterSet;
}
+ public function hasSameColumnTypeAs(PhabricatorConfigColumnSchema $other) {
+ $u_type = $this->getColumnType();
+ $v_type = $other->getColumnType();
+
+ if ($u_type === $v_type) {
+ return true;
+ }
+
+ // See T13536. Display widths for integers were deprecated in MySQL 8.0.17
+ // and removed from some display contexts in or around 8.0.19. Older
+ // MySQL versions will report "int(10)"; newer versions will report "int".
+ // Accept these as equivalent.
+
+ static $map = array(
+ 'int(10) unsigned' => 'int unsigned',
+ 'int(10)' => 'int',
+ 'bigint(20) unsigned' => 'bigint unsigned',
+ 'bigint(20)' => 'bigint',
+ );
+
+ if (isset($map[$u_type])) {
+ $u_type = $map[$u_type];
+ }
+
+ if (isset($map[$v_type])) {
+ $v_type = $map[$v_type];
+ }
+
+ return ($u_type === $v_type);
+ }
+
public function getKeyByteLength($prefix = null) {
$type = $this->getColumnType();
@@ -138,7 +169,7 @@
$issues[] = self::ISSUE_COLLATION;
}
- if ($this->getColumnType() != $expect->getColumnType()) {
+ if (!$this->hasSameColumnTypeAs($expect)) {
$issues[] = self::ISSUE_COLUMNTYPE;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 13, 10:52 AM (5 d, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7617297
Default Alt Text
D21265.diff (1 KB)
Attached To
Mode
D21265: Update MySQL schema inspection code for deprecation of integer display widths
Attached
Detach File
Event Timeline
Log In to Comment