summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-13 16:04:28 -0700
committerBrion Vibber <brion@pobox.com>2010-10-13 16:04:28 -0700
commit229c7726344714187dad2641879cb9c4211cc85d (patch)
tree54e732c0576b0aaeb0479ad785824ec2e9468d86 /scripts
parent4101de7dd7cf059816c29c666c816f260a84c252 (diff)
Filter table definitions to scrub out unsupported features before trying to alter a table. This lets us skip those where we end up trying to change unsupported features.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dumpschema.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/dumpschema.php b/scripts/dumpschema.php
index 3c2363638..fcf2430d8 100644
--- a/scripts/dumpschema.php
+++ b/scripts/dumpschema.php
@@ -129,17 +129,19 @@ function dumpBuildTable($tableName)
function dumpEnsureTable($tableName)
{
- echo "-- \n";
- echo "-- $tableName\n";
- echo "-- \n";
-
$schema = Schema::get();
$def = getCoreSchema($tableName);
$sql = $schema->buildEnsureTable($tableName, $def);
- $sql[] = '';
- echo implode(";\n", $sql);
- echo "\n";
+ if ($sql) {
+ echo "-- \n";
+ echo "-- $tableName\n";
+ echo "-- \n";
+
+ $sql[] = '';
+ echo implode(";\n", $sql);
+ echo "\n";
+ }
}
function showDiff($a, $b)