Skip to content

Instantly share code, notes, and snippets.

@jsor
Created December 13, 2011 11:12
Show Gist options
  • Save jsor/1471735 to your computer and use it in GitHub Desktop.
Save jsor/1471735 to your computer and use it in GitHub Desktop.
diff --git a/lib/Doctrine/DBAL/Schema/Comparator.php b/lib/Doctrine/DBAL/Schema/Comparator.php
index 0544c6e..39c712b 100644
--- a/lib/Doctrine/DBAL/Schema/Comparator.php
+++ b/lib/Doctrine/DBAL/Schema/Comparator.php
@@ -355,6 +355,18 @@ class Comparator
$changedProperties[] = 'comment';
}
+ $options1 = $column1->getPlatformOptions();
+ $options2 = $column2->getPlatformOptions();
+
+ $commonKeys = array_keys(array_intersect_key($options1, $options2));
+
+ foreach ($commonKeys as $key) {
+ if ($options1[$key] !== $options2[$key]) {
+ $changedProperties[] = 'platformOptions';
+ break;
+ }
+ }
+
return $changedProperties;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment