platform = $platform; } private function getTableSchema( array $tableSpec ): Schema { if ( !$tableSpec ) { // Used for not yet created tables. return new Schema(); } return $this->addTableToSchema( new Schema(), $tableSpec ); } public function getSchemaChangeSql( array $schemaChangeSpec ): array { $comparator = new Comparator(); $schemaDiff = $comparator->compare( $this->getTableSchema( $schemaChangeSpec['before'] ), $this->getTableSchema( $schemaChangeSpec['after'] ) ); return $schemaDiff->toSql( $this->platform ); } }